-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmail_send.py
More file actions
25 lines (16 loc) · 764 Bytes
/
Copy pathmail_send.py
File metadata and controls
25 lines (16 loc) · 764 Bytes
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
# smtplib -> this library is used for accesing simple mail tranfer protocall
import smtplib
print("process started...")
# Set the host name and port no:
server = smtplib.SMTP_SSL("smtp.gmail.com",465)
print("server started...")
# Enter senders email id and password for login purpose
server.login("nikhil.s.wani@gmail.com", "put your password")
print("login succesfully....")
# Enter sender email id receivers email id
# you can write your subject name as "Subject: <subject>"
# discription as "\n\n <discription>"
server.sendmail("nikhil.s.wani@gmail.com","sureshlimkar@gmail.com","Subject: 2nd Practical demo Nikhil Wani \n\n Welcome to email world \nFrom nikhil Wani!!!")
print("mail sent....")
#quit the server
server.quit()