{"id":21978154,"url":"https://github.com/codeterrayt/pythonmailwithattachments","last_synced_at":"2025-07-07T02:40:35.940Z","repository":{"id":188685252,"uuid":"326152315","full_name":"codeterrayt/PythonMailWithAttachments","owner":"codeterrayt","description":"This PythonMailWithAttachments project allows you to send emails with attachments using Python. It uses the smtplib library to establish an SMTP connection and the email library to create and format the email message. This script is particularly useful for sending automated emails with attachments.","archived":false,"fork":false,"pushed_at":"2024-01-28T10:04:28.000Z","size":3,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-28T16:58:35.529Z","etag":null,"topics":["automation","email-library","file-attachment","programming","python","python-mail","python-project","python3","smtp","smtplib"],"latest_commit_sha":null,"homepage":"https://youtu.be/uAfeB4jMLXg?si=JPtr0q6y7X3Sppsd","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codeterrayt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2021-01-02T09:48:25.000Z","updated_at":"2024-12-11T13:03:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"39c3b7fa-469a-4229-9077-72a4857968e8","html_url":"https://github.com/codeterrayt/PythonMailWithAttachments","commit_stats":null,"previous_names":["codeterrayt/pythonmailwithattachments-","codeterrayt/pythonmailwithattachments"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/codeterrayt/PythonMailWithAttachments","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeterrayt%2FPythonMailWithAttachments","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeterrayt%2FPythonMailWithAttachments/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeterrayt%2FPythonMailWithAttachments/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeterrayt%2FPythonMailWithAttachments/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codeterrayt","download_url":"https://codeload.github.com/codeterrayt/PythonMailWithAttachments/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeterrayt%2FPythonMailWithAttachments/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264003301,"owners_count":23542601,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","email-library","file-attachment","programming","python","python-mail","python-project","python3","smtp","smtplib"],"created_at":"2024-11-29T16:18:11.547Z","updated_at":"2025-07-07T02:40:35.912Z","avatar_url":"https://github.com/codeterrayt.png","language":"Python","readme":"# 📧 Python Mail with Attachments\n\nSend emails with attachments using Python's `smtplib` and the `email` library. This simple script demonstrates how to send emails with attachments programmatically.\n\n## Introduction\n\nThis PythonMailWithAttachments project allows you to send emails with attachments using Python. It uses the `smtplib` library to establish an SMTP connection and the `email` library to create and format the email message. This script is particularly useful for sending automated emails with attachments.\n\n## Features\n\n- **Attachment Support:** Attach files to your emails with ease.\n- **Easy Configuration:** Set up sender's email, password, receiver's email, and other details in the script.\n- **Customizable Message:** Personalize the email body as needed.\n\n## Prerequisites\n\nEnsure you have Python installed on your system.\n\n## Installation\n\n1. Clone the GitHub repository:\n\n    ```bash\n    git clone https://github.com/codeterrayt/PythonMailWithAttachments.git\n    cd PythonMailWithAttachments\n    ```\n\n2. Install the required libraries:\n\n    ```bash\n    pip install secure-smtplib\n    ```\n\n## Usage\n\n1. Open `main.py` in a text editor.\n\n2. Update the following variables with your email details:\n    - `fromaddr`: Sender's email address.\n    - `password`: Sender's email password.\n    - `toaddr`: Receiver's email address.\n    - `subject`: Email subject.\n    - `body`: Email body text.\n    - `filename`: Name of the file to be attached (e.g., \"home.png\").\n\n3. Save the changes.\n\n4. Run the script:\n    ```bash\n    python main.py\n    ```\n\n5. The script will prompt you for your email password and send the email with the attached file.\n\n## Development\n\nFeel free to explore and modify the code to suit your specific needs. You can customize the email subject, body, and attachment details as per your requirements.\n\n## Acknowledgments\n\nThis project uses the `smtplib` and `email` libraries for sending emails with attachments. Explore the [Python `smtplib` Documentation](https://docs.python.org/3/library/smtplib.html) and [Python `email` Documentation](https://docs.python.org/3/library/email.html) for more information.\n\n💌 Happy Emailing! 🚀\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeterrayt%2Fpythonmailwithattachments","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodeterrayt%2Fpythonmailwithattachments","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeterrayt%2Fpythonmailwithattachments/lists"}