https://github.com/shawwwn/uMail
The API was designed in a way so that it can accommodate sending long emails in a memory constrained system.
There is no pre-defined options for email headers(from/to/subject) so you have to draft up your own
Code: Select all
import umail
smtp = umail.SMTP('smtp.gmail.com', 465, ssl=True) # Gmail's SSL port
smtp.login('bob@gmail.com', 'bobspassword')
smtp.to('alice@gmail.com')
smtp.write("From: Bob <bob@gmail.com>\n")
smtp.write("To: Alice <alice@gmail.com>\n")
smtp.write("Subject: Poem\n")
smtp.write("Roses are red.\n")
smtp.write("Violets are blue.\n")
smtp.write("...\n")
smtp.send()
smtp.quit()
UPDATE 1: Changed argument name 'email' to 'username' as brought up by @SpotlightKid