Advertisement
leehwak6

Untitled

Aug 19th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. import smtplib
  2.  
  3.  
  4.  
  5.  
  6. Name=input("[+] Please input from Name:")
  7. From=input("[+] Please input from Email:")
  8. Subj=input("[+] Please input Subject :")
  9. ltr=input("[+] Please input Letter source code :")
  10. to=input("[+] Please input to :")
  11.  
  12. msg = "From: %s <%s>\nTo: %s\nMIME-Version: 1.0\nContent-type: text/html\nSubject: %s\n\n%s"% ( Name,From,to, Subj, ltr )
  13.  
  14.  
  15. try:
  16. smtpObj = smtplib.SMTP('localhost')
  17. smtpObj.sendmail(sender, receivers, message)
  18. print "Successfully sent email"
  19. except SMTPException:
  20. print "Error: unable to send email"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement