Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import smtplib
- Name=input("[+] Please input from Name:")
- From=input("[+] Please input from Email:")
- Subj=input("[+] Please input Subject :")
- ltr=input("[+] Please input Letter source code :")
- to=input("[+] Please input to :")
- msg = "From: %s <%s>\nTo: %s\nMIME-Version: 1.0\nContent-type: text/html\nSubject: %s\n\n%s"% ( Name,From,to, Subj, ltr )
- try:
- smtpObj = smtplib.SMTP('localhost')
- smtpObj.sendmail(sender, receivers, message)
- print "Successfully sent email"
- except SMTPException:
- print "Error: unable to send email"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement