-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproject_mail.py
More file actions
46 lines (39 loc) · 1.29 KB
/
project_mail.py
File metadata and controls
46 lines (39 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import gmail
def send_mail_for_openacn(to_mail,uacno,uname,upass,udate):
con=gmail.GMail('ENTER EMAIL','ENTER GOOGLE PASSCODE')
sub="Account Opened with ABC Bank"
body=f"""Dear {uname},
Your account has been opened successfully with ABC Bank and details are
ACN = {uacno}
Pass = {upass}
Open date = {udate}
Kindly change your password when you login first time
Thanks
ABC Bank
Noida"""
msg=gmail.Message(to=to_mail,subject=sub,text=body)
con.send(msg)
def send_otp(to_mail,uname,uotp):
con=gmail.GMail('ENTER EMAIL','ENTER GOOGLE PASSCODE')
sub="OTP password recovery"
body=f"""Dear {uname},
Your OTP to get password = {uotp}
Kindly verify this otp to application
Thanks
ABC Bank
Noida
"""
msg=gmail.Message(to=to_mail,subject=sub,text=body)
con.send(msg)
def send_otp_del(to_mail,uname,uotp):
con=gmail.GMail('ENTER EMAIL','ENTER GOOGLE PASSCODE')
sub="Account Deletion OTP"
body=f"""Dear {uname},
Your OTP to get password = {uotp}
Kindly verify this otp to application for account deletion.
Thanks
ABC Bank
Noida
"""
msg=gmail.Message(to=to_mail,subject=sub,text=body)
con.send(msg)