From fb484b71c932c403e360f52de40c250d19d18189 Mon Sep 17 00:00:00 2001 From: tuhin98744 <62651163+tuhin98744@users.noreply.github.com> Date: Tue, 19 Oct 2021 09:08:42 -0400 Subject: [PATCH] Create auto-mail-sender --- auto-mail-sender | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 auto-mail-sender diff --git a/auto-mail-sender b/auto-mail-sender new file mode 100644 index 0000000..0c54c32 --- /dev/null +++ b/auto-mail-sender @@ -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!!!!')