headers = "rn".join(["from: " + GMAIL_USERNAME,
"subject: " + email_subject
"to: " + recipient,
"mime-version: 1.0",
"content-type: text/html"])
# body_of_email can be plaintext or html!
content = headers + "rnrn" + body_of_email
session.
sendmail(GMAIL_USERNAME, recipient, content)