Skip to content

A Python script that allows users to send emails using Python. My script allows me to send an email from a Gmail account I created for this purpose.

Notifications You must be signed in to change notification settings

zig-182/send-emails-with-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Description

For this task, I wanted to send an email through Python. I wrote a script that would allow me to send an email from a Gmail account I created for this purpose.

Languages

  • Python

  • HTML (very basic)

Overview

After determining what I felt was the most suitable library to import, I researched how to send the email and let the sender know the email had been sent successfully. This included:

  • Overcoming the security features in Gmail that initially prevented me from being able to send an email
  • A feedback response on the terminal to let the user know the email was sent

Points to Note

  • My code was written for sending an email through Gmail
    • The process might be different if you use a different email service provider
    • Google takes steps to prevent less secure apps/sites from being able to access the Google Server. You can change the settings here: https://myaccount.google.com/apppasswords
  • Due to security concerns, I set up a Gmail account (I didn’t use my personal account) for use with this script and removed any personal information from my published code:
    • There are notes in the code to help you fill in the relevant parts
    • Feel free to use my code, but ensure you remove any personal or sensitive information before publishing it

Going Forward

This is the first version of this script. I see a lot of potential for extending this script and in the future I look forward to researching and incorporating the following:

  • Enhancing the HTML code
  • Adding attachments
  • Scheduling the emails to be sent at a certain time or with a certain frequency
  • Linking to an API to get dynamic content
    • For example, a weather API to tell me what the weather will be like today

About

A Python script that allows users to send emails using Python. My script allows me to send an email from a Gmail account I created for this purpose.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published