Created
March 16, 2013 05:01
-
-
Save JoshAshby/5175068 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
#Never done email in python however this seemed to work on my VPS with it's smtp server... | |
import smtplib | |
from email.mime.text import MIMEText | |
msg = MIMEText("This is a test") | |
msg['Subject'] = "test" | |
msg['To'] = "[email protected]" | |
msg['From'] = 'loki' | |
s = smtplib.SMTP('localhost') | |
s.sendmail("loki", ["[email protected]"], msg.as_string()) | |
s.quit() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment