Skip to content

Andrewcpu/textmail

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TextMail

This package can be used to send text messages and emails from Python3.

Please submit a PR for additional mobile providers and email providers.

Implemented Email Providers

  • Gmail
  • Hotmail
  • Live
  • Outlook
  • Yahoo
  • Comcast
  • AOL

Implemented SMS Providers

  • AT&T (ATNT)
  • Sprint
  • TMobile
  • Verizon
  • VirginMobile
from mailer.TextMessage import TextMessage
from mobile.tmobile import TMobile
from mobile.verizon import Verizon
from mobile.sprint import Sprint
from providers.email_credentials import Credentials
from providers.gmail import Gmail

message = TextMessage(Credentials("john@gmail.com", "[App Password]", Gmail()))

Send email with list of Strings

message.email(subject="Hello world!", body="This is the message body.", recipients=["dave@gmail.com", "mark@gmail.com", "kyle@yahoo.com"])

Send email with list of Email objects

message.email(subject="Hello world!", body="This is the message body.", recipients=[Email("dave@gmail.com"), Email("mark@gmail.com"), Email("kyle@yahoo.com")])

Send a text message

message.text(subject="Hello world!", body="This is the message body.", recipients=[ Sprint("0001112233")])

Send to a mix

message.send(subject="Hello world!", body="This is the message body.", recipients=[Email("dave@gmail.com"), Verizon("1234567890"), ATNT("0987654321")])

About

A Python3 package to send text messages and emails via SMTP

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages