Skip to content

Commit 99a14a4

Browse files
authored
Merge pull request #41 from ABHI99-coder/master
Create OTP Verification System
2 parents 064c262 + e60139f commit 99a14a4

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

OTP Verification System

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import os
2+
import math
3+
import random
4+
import smtplib
5+
6+
digits="0123456789"
7+
OTP=""
8+
for i in range(6):
9+
OTP+=digits[math.floor(random.random()*10)]
10+
otp = OTP + " is your OTP"
11+
msg= otp
12+
s = smtplib.SMTP('smtp.gmail.com', 587)
13+
s.starttls()
14+
s.login("Your Gmail Account", "You app password")
15+
emailid = input("Enter your email: ")
16+
s.sendmail('&&&&&&&&&&&',emailid,msg)
17+
a = input("Enter Your OTP >>: ")
18+
if a == OTP:
19+
print("Verified")
20+
else:
21+
print("Please Check your OTP again")

0 commit comments

Comments
 (0)