Skip to content

Commit 15c0aa7

Browse files
committed
Script to send mail using Python
1 parent 35be0df commit 15c0aa7

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Scripts/P07_ScriptToSendMail.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Author: OMKAR PATHAK
2+
3+
import smtplib
4+
5+
fadd = '' # sender's email address
6+
tadd = '' # receiver's email address
7+
msg = 'Mail sent through Python!' # Message to be sent!
8+
username = '' # Your username(email ID)
9+
password = '' # Your password for above email ID
10+
server = smtplib.SMTP('smtp.gmail.com',587)
11+
server.ehlo()
12+
server.starttls()
13+
server.login(username,password)
14+
server.sendmail(fadd,tadd,msg)

0 commit comments

Comments
 (0)