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
Build program
Run setup.sh
(can be run by simply double-clicking on the file).
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 data/template.json
.
Template Format
Key | Value |
---|---|
subject (formatted) |
E-mail subject |
body (formatted) |
E-mail body |
attachments (optional) |
Paths to any attachments that should be included |
Formatted fields can include the following variables
Variable | Data |
---|---|
{name} |
Company name |
{email} |
Company E-mail |
Usage
Prepare data
Copy and paste the table into data/email-list.txt
.
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.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e0f96e5d12a32846ddfe4e9da894697082860ef56f41a99e89e6a03c83c3a10b |
|
MD5 | 414038e3648aa36c77ee0aff60d2df34 |
|
BLAKE2b-256 | 561bdf399037a133705ef645661ee048a52344959ba24be28fb61d634043d107 |
Hashes for email_draft_generator-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cdbe115e82297e8a5c519a9fa37ce4d01374fb1d78adfcaf706b7af883e3d03d |
|
MD5 | 2c07e4ef9c859f807f6a547c7b2ec52f |
|
BLAKE2b-256 | 5603f53997a04bde2c3c027bf1b5e25d926dfa483d71d47193fa857ed349d4a1 |