Last active
October 30, 2020 13:51
-
-
Save rahim42324/1012b3f567507a9405d1ca2a535ce1d0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import smtplib | |
| from email.mime.multipart import MIMEMultipart | |
| from email.mime.text import MIMEText | |
| mail_content = 'This is a simple mail' | |
| #The mail addresses and password | |
| sender_address = 'sender123@gmail.com' | |
| sender_pass = 'xxxxxxxx' | |
| receiver_address = 'receiver567@gmail.com' | |
| #Setup the MIME | |
| message = MIMEMultipart() | |
| message['From'] = sender_address | |
| message['To'] = receiver_address | |
| message['Subject'] = 'A test mail sent by Python. It has an attachment.' #The subject line |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment