Skip to content

A simple project made to practice and learn how to send emails with python

Notifications You must be signed in to change notification settings

jesusnavaso/send_emails_with_python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

This mini project was created in order to practice while watching the wonderful YouTube tutorial:

Link to Corey Schafer YouTube tutorial


TIPS AND COMMENTS

  • If you want to launch a local debugging mail server, instead of using your real email and the password that google provided you, you can do it with the smtpd python library:

    python3 -m smtpd -c DebuggingServer -n localhost:1025
    

    Which will be listening in the specified port. Then just change the line:

    smtplib.SMTP_SSL('smtp.gmail.com', port=465)
    

    with

    smtplib.SMTP('localhost', port=1025)
    

    You will not need to login.

    WARNING: If you add attachments, they will appear in the debugging server as very long binary strings that will hide the rest of the email. So the debugging server works better for just text emails.

  • The html content of the body of the email is directly read from the file resources/html_body_of_email.html

About

A simple project made to practice and learn how to send emails with python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published