-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSendingMailAtEntry.py
26 lines (20 loc) · 1.04 KB
/
SendingMailAtEntry.py
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
import smtplib
from email.message import EmailMessage
def sendmail(name,emailid,time,reason,outime,outdate):
server = smtplib.SMTP_SSL('smtp.gmail.com',465)
#debugging the date
print(outdate)
msg=EmailMessage()
msg['From'] = "akatsukiorganisationdev999@gmail.com"
print("succesfull")
msg['To'] = str(emailid)
msg['Subject']="Your OutGoing Report!!"
msg.set_content(f" Hello Mr/Mrs {name} , Your Details \n\n <----------------------------------------------------------->\n\n"
f"\t\t\t Reason:{reason} \n\n \t\t\t Time:{time} \n\n\n"
f"\t\t Your OutGoing Date.... \n\n<-------------------------------------------------------------> \n\n "
f"\t\t Out*Time:{str(outime)} \n\n "
f"\t\t Out*Date:{str(outdate)} \n\n\n \t 🟥🟧🟨 Don't Reply🟦🟪🟫 \t\t ")
server.login("akatsukiorganisationdev999@gmail.com","lgrztplkwseotosn")
server.send_message(msg)
server.quit()
print("fully succesfull")