Guest User

Untitled

a guest
Dec 14th, 2015
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import smtplib
  2. import email.utils
  3. from email.mime.text import MIMEText
  4.  
  5. # Create the message
  6. msg = MIMEText('This is the body of the message.')
  7. msg['To'] = email.utils.formataddr(('Recipient', '؟؟؟؟؟؟؟؟'))
  8. msg['From'] = email.utils.formataddr(('Author', '؟؟؟؟؟؟؟؟'))
  9. msg['Subject'] = 'Simple test message'
  10.  
  11. server = smtplib.SMTP('mail')
  12. server.set_debuglevel(True) # show communication with the server
  13. try:
  14.     server.sendmail('[email protected]', ['[email protected]'], msg.as_string())
  15. finally:
  16.     server.quit()
Advertisement
Add Comment
Please, Sign In to add comment