Skip to content

Commit a8d028e

Browse files
Sending Email Using Python
1 parent 0c62738 commit a8d028e

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

Email-Sender/email-sender.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import smtplib
2+
3+
to = input("Enter the Email of recipent:\n")
4+
content = input("Enter the Content for E-Mail:\n")
5+
6+
def sendEmail(to, content):
7+
server = smtplib.SMTP('smtp.gmail.com','587')
8+
server.ehlo()
9+
server.starttls()
10+
server.login('senderemail@gmail.com','12345678')
11+
server.sendmail('senderemail@gmail.com',to,content)
12+
server.close()
13+
14+
sendEmail(to, content)

0 commit comments

Comments
 (0)