Commit e2bc2c1e authored by Jasvitha Allamsetty's avatar Jasvitha Allamsetty
Browse files

Upload New File

parent fdb57ce7
Pipeline #37787 failed with stages
in 0 seconds
import random
import smtplib
server=smtplib.SMTP('smtp.gmail.com',587)
#adding TLS security
server.starttls()
server.login("reachylimited@gmail.com","okqtubxhisupwlew")
#generate OTP using random.randint() function
otp=''.join([str(random.randint(0,9)) for i in range(6)])
msg='Hello, Your OTP is '+str(otp)
sender='reachylimited@gmail.com' #write email id of sender
receiver='jasvitha2305@gmail.com' #write email of receiver
#sending
server.sendmail(sender,receiver,msg)
server.quit()
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment