Learning Python Network Programming by Sarker Dr. M. O. Faruque & Washington Sam

Learning Python Network Programming by Sarker Dr. M. O. Faruque & Washington Sam

Author:Sarker, Dr. M. O. Faruque & Washington, Sam [Sarker, Dr. M. O. Faruque]
Language: eng
Format: mobi, epub, azw3
Publisher: Packt Publishing
Published: 2015-06-17T07:00:00+00:00


if __name__ == '__main__':

sender = input("Enter sender email address: ")

recipient = input("Enter recipeint email address: ")

send_email(sender, recipient)

The preceding code is similar to our first example, except for the authentication to the server. In this case, the SMTP user is authenticated against the server. If we run the script after turning on the SMTP debugging, then we would be seeing an output similar to the following:

$ python3 smtp_mail_sender_tls.py

Enter sender email address: [email protected]

Enter recipeint email address: [email protected]

Enter your email subject: Test email

Enter your email message. Press Enter when finished. This is a test email that can be ignored.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.