Created
May 27, 2016 17:59
-
-
Save makersm/76e5c90bc7be16b3584faf7c9768606a to your computer and use it in GitHub Desktop.
send email using python
This file contains 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.text import MIMEText | |
sender = 'sender@example.com' #my domain | |
recipient = 'recipient@example.com' | |
mail = MIMEText('message goes here') | |
mail['Subject'] = 'title goes here' | |
mailserver = smtplib.SMTP('localhost') | |
mailserver.sendmail(sender, recipient, mail.as_string()) | |
mailserver.quit() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Good job kid