
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
directus-extension-send-email-via-gmail-api
Advanced tools
Send emails from a Flow Operation with Gmail API.
This custom Directus operation extension allows you to send Gmail messages or create Gmail drafts directly inside Directus Flows, including support for multiple file attachments from your directus_files
collection.
send
or draft
action).to
, cc
, bcc
, reply-to
, in-reply-to
, references
, and threadId
headers.directus_files
) — files are read, base64-encoded, and properly attached as MIME parts.In your Flow, add the “Gmail: Send or Draft” operation. Fill in the required fields:
directus_files
IDs (as JSON array, e.g. ["uuid1", "uuid2"]
).This extension requires access to your Directus instance in order to fetch binary file contents for attachments.
Set the following variables in your Directus .env
file:
# Public URL of your Directus instance
PUBLIC_URL=https://your-directus.example.com
# A Directus admin static token (needed to download files internally)
ADMIN_TOKEN=your-admin-static-token
Note: This token is only used server-side to fetch file contents. It should not be exposed to clients.
⚠️ Important: This extension does not handle the OAuth 2.0 flow itself. You must obtain and refresh Gmail access tokens outside of Directus.
Required scopes:
https://www.googleapis.com/auth/gmail.send
(to send messages)https://www.googleapis.com/auth/gmail.compose
(to create drafts)The accessToken
must be provided manually in the Flow operation configuration (or injected dynamically via Flow variables).
POST https://gmail.googleapis.com/gmail/v1/users/me/messages/send
POST https://gmail.googleapis.com/gmail/v1/users/me/drafts
The extension builds a valid MIME message, encodes it in base64url, and sends it to the Gmail API.
PUBLIC_URL
and ADMIN_TOKEN
are correctly set in .env
.accessToken
you provide has not expired and contains the proper scopes.text
or html
correctly for the body type.MIT © Dan Denolf
FAQs
Send emails from a Flow Operation with Gmail API.
The npm package directus-extension-send-email-via-gmail-api receives a total of 8 weekly downloads. As such, directus-extension-send-email-via-gmail-api popularity was classified as not popular.
We found that directus-extension-send-email-via-gmail-api 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
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.