Skip to content

Instantly share code, notes, and snippets.

Last active Jun 7, 2017
What would you like to do?
Send a text message from Gmail with Python
# allow less secure apps to access your Gmail at:
# for AT&T
# for Sprint
# for T-Mobile
# for Verizon
import smtplib
username = ""
password = "your_gmail_password"
to_addrs= ""
server = smtplib.SMTP("")
server.login(username, password)
server.sendmail(username, to_addrs, "Enter your text message")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment