Skip to content
This repository was archived by the owner on Sep 20, 2021. It is now read-only.
Merged

Task3 #108

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Submissions/garvitchittora/Task_3/email.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import smtplib,getpass
connection = smtplib.SMTP('smtp.gmail.com', 587)
connection.starttls()
id = getpass.getpass('id:')
pwd = getpass.getpass('password: ')
connection.login(id, pwd)
rec = input("Enter the person whom you want to send the mail: ")
subject = input("Subject: ")
message = input('Message to Send: ')
finalmess = 'Subject: ' + subject+ "\n" + "Message: " + message
connection.sendmail(id,rec, finalmess)
connection.quit()