Advertisement
Guest User

Untitled

a guest
Jan 24th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. import smtplib
  2.  
  3. login = {"username": "pibot@mg.n-compass.tv", "password":""}
  4. mailgun = {"server": "smtp.mailgun.org", "port": 587}
  5.  
  6. def send_message_via_smtp(sender, reciever, msg):
  7. smtp = smtplib.SMTP(mailgun["server"], mailgun["port"])
  8. smtp.login(login["username"], login["password"])
  9. smtp.sendmail(sender, reciever, msg)
  10.  
  11. send_message_via_smtp("pibot@n-compass.biz", "name@ncmpass.biz", "i'm alive!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement