Thought this might interest some people. It's an example of using SMTP for texting. Requires a Gmail account though. Throw it in a loop and BAM!!!!! Text bomb. I think there is a limit though. The most I've ever sent in a row where around 150. My brother hated me that night lol.
I do plan on updating this with a GUI, logging, address book, conversation tracking, etc... Since at my house I don't get any cell service, this comes in handy. Might make a port to android too, so you can text through WiFi if you have no cell service.
carriers = {"Alltel":"@message.alltel.com",
"ATT":"@txt.att.net",
"NEXTEL":"@messaging.nextel.com",
"SPRI":"@messaging.sprintpcs.com",
"TMOBILE":"@tmomail.net",
"VERIS":"@vtext.com",
"VERGIN":"@vmobl.com"}
#replace 5555555555 with a working number and correct carrier address
def sendText(body, to = "5555555555@txt.att.net", username = "yourAccount@gmail.com", password = "Your password"):
"""Sends a text via Gmail"""
mail_server = smtplib.SMTP("smtp.gmail.com", 587)
mail_server.ehlo() mail_server.starttls()
mail_server.ehlo()
mail_server.login(username, password)
mail_server.sendmail(username, to, body) mail_server.close()