Skip to content
Open
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
16 changes: 16 additions & 0 deletions auto-mail-sender
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import smtplib
from email.message import EmailMessage

email = EmailMessage()
email['from'] = 'From name'
email['to'] = input("Enter email address seperated by commas: ")
email['Subject'] = 'Type the subject'

email.set_content("this EMAIL SEND AUTOMATICALLY USING PYTHON")

with smtplib.SMTP(host='smtp.gmail.com', port=587) as smtp:
smtp.ehlo()
smtp.starttls()
smtp.login('username', 'password') #username is your gmail and password is your gmail password
smtp.send_message(email)
print('Email send successfully!!!!')