-
-
Save amankharwal/de08420bac3e428c23342ddeca500d6b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import math | |
import random | |
import smtplib | |
digits="0123456789" | |
OTP="" | |
for i in range(6): | |
OTP+=digits[math.floor(random.random()*10)] | |
otp = OTP + " is your OTP" | |
msg= otp | |
s = smtplib.SMTP('smtp.gmail.com', 587) | |
s.starttls() | |
s.login("Your Gmail Account", "You app password") | |
emailid = input("Enter your email: ") | |
s.sendmail('&&&&&&&&&&&',emailid,msg) | |
a = input("Enter Your OTP >>: ") | |
if a == OTP: | |
print("Verified") | |
else: | |
print("Please Check your OTP again") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment