Advertisement
Guest User

Untitled

a guest
Feb 19th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. mailServer = smtplib.SMTP(SMTP_SERVER, SMTP_PORT)
  2. mailServer.ehlo()
  3. mailServer.starttls()
  4. mailServer.login(FROM_EMAIL, PASSWORD)
  5. mailServer.sendmail(FROM_EMAIL, finalReciepients, msg.as_string())
  6. mailServer.close() # Should be mailServer.quit(), but that crashes...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement