Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/loglux/csv2email
This project automates the process of sending emails via the Office 365 API or Gmail API
https://github.com/loglux/csv2email
gmail-api mail-sender ms-outlook oauth2 office365
Last synced: 1 day ago
JSON representation
This project automates the process of sending emails via the Office 365 API or Gmail API
- Host: GitHub
- URL: https://github.com/loglux/csv2email
- Owner: loglux
- Created: 2024-03-06T01:38:57.000Z (10 months ago)
- Default Branch: master
- Last Pushed: 2024-07-31T12:32:12.000Z (5 months ago)
- Last Synced: 2024-07-31T15:46:17.001Z (5 months ago)
- Topics: gmail-api, mail-sender, ms-outlook, oauth2, office365
- Language: Python
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Office 365 Email Automation
## Project Overview
This script automates the process of sending emails through the Office 365 API using a Python script (`o365_email_sender.py`). It reads recipient details from a CSV file (`companies_info.csv`) and uses an HTML email template (`email_template.txt`) to craft content. It is aimed at automating email outreach and is a robust tool for businesses and individuals.## Prerequisites
- Python 3.x
- An Office 365 account with API access enabled
- The O365 Python package## Setup and Installation
1. Clone this repository.
2. Install the required dependencies:
- Directly via pip: `pip install O365`
- Or from the `requirements.txt` file: `pip install -r requirements.txt`
3. Insert your Office 365 API **client_id** and **client_secret** into the **o365_email_sender.py**.
4. Ensure the `o365_token.txt` is present for storing authentication tokens.
5. Update **email_template.txt** and **companies_info.csv** with your specific email content and recipient information.## Usage
- Populate the CSV file with target recipient details, including columns for name, email, etc.
- Customise the email template as necessary.
- Run the script with the command: `python o365_email_sender.py`## Features
- Secure authentication with the Office 365 API.
- Dynamic email content using a customisable HTML template.
- Recipient management via CSV.
- Test mode for validation.
- Automated email sending with adjustable delays to prevent rate limiting.
- Generates a report (`email_report.txt`) detailing the outcomes of the email dispatch process.## Contributing
Contributions to improve or extend the functionality are highly encouraged. Please fork the repository and submit pull requests for any proposed changes or fixes.## License
This project is distributed under the MIT License. Refer to the LICENSE file for more information.