Skip to content

Instantly share code, notes, and snippets.

@123Phil
Created February 24, 2013 20:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save 123Phil/5025516 to your computer and use it in GitHub Desktop.
Save 123Phil/5025516 to your computer and use it in GitHub Desktop.
Simple python text mailer
import smtplib
username = 'gmail_username'
password = 'gmail_password'
fromaddr = 'gmail_username@gmail.com'
toaddrs = '10digit_phone_number@txt.att.net'
msg = 'Message to be sent'
server = smtplib.SMTP('smtp.gmail.com:587')
server.starttls()
server.login(username,password)
server.sendmail(fromaddr, toaddrs, msg)
server.quit()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment