public
Created

Simple python text mailer

  • Download Gist
mail.py
Python
1 2 3 4 5 6 7 8 9 10 11 12 13 14
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()

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.