A utility to generate E-mail drafts from a list of E-mail addresses.
Project description
Email Generator
Installation
Download the latest release as a tar.gz
file.
Setup
Set up the Google API
Follow the guide at https://developers.google.com/gmail/api/quickstart/python#set_up_your_environment to generate OAuth2 credentials, and, when you are at the step to configure the OAuth consent screen, add the gmail.compose
scope so the script can edit drafts. Download them into .credentials/credentials.json
(you will have to create this directory yourself, and show hidden files to see it on MacOS).
Set up the template
- update the email template in
email_generator/email_creator.py
- put the file paths to any attachments in the
attachment_paths
list inemail_generator/main.py
Build program
Run setup.sh
(can be run by simply double-clicking on the file)
If you make any changes to the template after this, run setup.sh
again.
Usage
Prepare data
- copy and paste the table into
email-template.txt
- make sure there is nothing else in the file
- save it
Run the program
Run run.sh
(can be run by double-clicking as well)
The first time it is run, you will need to authenticate with the account that you want to upload the drafts to. A browser window should be opened automatically to do this in (if it is not, copy and paste the URL from the terminal window into your browser). The authentication flow may not work in Firefox or other Gecko-based browsers, so try Chrome, Safari, or another Chromium- or Webkit-based browser if it doesn't work for you.
Building from source
Install the build
tool with pip and run python3 -m build
to build the package.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for email_draft_generator-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42b856bff290cfb0be1fea87b975e0cfe7609beb362bd9bb47e0b0cc6afd8a78 |
|
MD5 | ca0729724388058b9177cb940ba13c55 |
|
BLAKE2b-256 | 8a4b3222c8b26ecb0a10c247cd22ef3c0674fa17f8d0550c5bd5af39ad956e5b |
Hashes for email_draft_generator-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0de83b06ed0510a7e663cf55e5e6b95dbdfc141b837269679a1f9fe957df56e0 |
|
MD5 | b9ea56dc517e93268d7765ef8c4d774e |
|
BLAKE2b-256 | df3d391f6306aa31958f4613f5b3a1b387d43884a190fc0d721826696f43a9da |