Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Simple tool to take a CSV and a template and create drafts in your Gmail. Can be used as a command line tool, or as a library.
Simple tool to take a CSV and a template and create drafts in your Gmail. Useful for sending emails to large-ish numbers of people where you want to slightly customize the emails for each user. You can quickly run through drafts, customize it, and send.
pip install -U gmail-draft-creator
Usage: gmail-draft-creator [OPTIONS]
Options:
--csv PATH Path to the CSV file. [required]
--template PATH Path to the template file. [required]
--subject TEXT Subject for the email drafts.
--dry-run Run script without creating drafts.
--help Show this message and exit.
You can also import the create_draft
function and use it in your own scripts.
Must contain an email
column (case insensitive).
Each column in the CSV is passed as a parameter to the provided template. The column name is stripped of whitespace, lowercased, and stripped all non-alpha characters. For example, a column named First Name
would be passed as $firstname
in the template.
You can include subject line and variables in the template file:
Subject: Hello $NAME
Hi, here's another ${REASON} why I'm emailing you.
A CSV file that would work with this template might be something like this:
Email,Name,Reason,OtherColumn,...
joe@test.com,Joe,reminder,...
jeff@email.com,Jeff,sales pitch,...
You need to create a "OAuth 2.0 Client IDs" which has to be done with a Google Workspace (gsuite). This will not work on a personal gmail account (unless you create a app on a workspace and add your personal account as a test account).
credentials.json
, and place it in the root of this project.If you want to edit scopes on an existing application, you can:
Two main scopes are required for this:
https://www.googleapis.com/auth/gmail.compose
https://www.googleapis.com/auth/gmail.readonly
Some other scopes I'd add so you can reuse the credentials in other projects, like gmailctl or calendar scripts:
https://www.googleapis.com/auth/calendar.readonly
https://www.googleapis.com/auth/calendar.event
https://www.googleapis.com/auth/gmail.labels
https://www.googleapis.com/auth/gmail.settings.basic
FAQs
Simple tool to take a CSV and a template and create drafts in your Gmail. Can be used as a command line tool, or as a library.
We found that gmail-draft-creator demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.