SHOW:
|
|
- or go back to the newest paste.
| 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', '[email protected]'))
|
| 7 | + | msg['To'] = email.utils.formataddr(('Recipient', '؟؟؟؟؟؟؟؟'))
|
| 8 | - | msg['From'] = email.utils.formataddr(('Author', '[email protected]'))
|
| 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() |