Skip to content

imranc07/python-smtp-email-automation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ“ง Python Email Automation using SMTP

Automating emails is a powerful way to save time and ensure timely communication for reminders, reports, notifications, and alerts. This project demonstrates how to send emails programmatically using Pythonโ€™s built-in smtplib and email modules with Gmailโ€™s SMTP server.


๐Ÿš€ Features

  • Send automated emails with custom subject and body
  • Supports Gmail SMTP (SSL)
  • Useful for reminders, reports, notifications, alerts, and bulk emails
  • Lightweight โ€“ built using only Python standard libraries

๐Ÿ“Œ Problem Statement

Create a Python script that automates sending emails via SMTP โ€“ useful for reminders, reports, or alerts.


๐Ÿ› ๏ธ Requirements

  • Python 3.x
  • Gmail account with App Passwords enabled (for security)

โšก Setup Instructions

  1. Enable 2-Step Verification in your Gmail account.
  2. Generate an App Password from Google (use this instead of your normal Gmail password).
  3. Replace the placeholders in the script:
    email['From'] = '[email protected]'
    smtp.login('[email protected]', 'your_app_password')
    send_email('[email protected]', 'Test Subject', 'Hello, this is a test email!')
  4. Run the script:
    python email_automation.py

๐Ÿ”’ Security Note

  • Never hardcode your real Gmail password in scripts.
  • Always use App Passwords for SMTP authentication.
  • Consider storing credentials in environment variables or a .env file.

๐Ÿ“œ License

This project is licensed under the MIT License โ€“ feel free to use and modify it.


๐Ÿค Contributing

Contributions, issues, and feature requests are welcome!
Feel free to fork this repo and submit pull requests.


โญ Support

If you find this project useful, consider giving it a โญ on GitHub.

Releases

No releases published

Packages

No packages published

Languages