The @simplens/nodemailer-gmail plugin enables email delivery through Gmail SMTP (or any compatible SMTP server) using Nodemailer, with built-in support for file attachments and inline base64 image extraction.
Before calling the plugin, SimpleNS Core handles template variable substitution ({{variable}}) and resolves any file attachments into buffer or stream payloads. When the plugin's send() method runs:
Receives the pre-rendered notification payload and resolved attachments
Validates attachment size, count, and MIME type rules (and extracts any inline base64 <img> tags in HTML bodies into CID attachments)
Auto-detects whether the message body is HTML or plain text
Sends the email via Gmail SMTP and classifies any SMTP or validation errors as retryable or non-retryable
Gmail has sending limits: ~500 emails/day for regular accounts and ~2,000/day for Google Workspace.
Install @simplens/nodemailer-gmail from the plugin catalog.
Add a provider instance, enter your EMAIL_USER and EMAIL_PASS (Gmail App Password) plus any optional SMTP or attachment settings, and configure rate limits.
Assign the provider as the default (or fallback) for the email channel in Channel Routing.
Credentials are encrypted at rest in MongoDB and hot-reloaded across all workers and processors via Redis Pub/Sub.
Resolved payloads required: SimpleNS Core downloads each attachment into a buffer or stream before calling the plugin. Raw url paths are not accepted by Nodemailer and fail non-retryably.
Disabled guard: If ATTACHMENT_ENABLED is set to "false", any notification containing attachments fails immediately with a non-retryable error.
Applies per file AND cumulatively across all file attachments + inline base64 images (keeps total MIME size under Gmail's 25 MB limit after ~33% base64 overhead)
When an HTML email body contains inline data URIs (<img src="data:image/...;base64,...">), the plugin automatically extracts them and converts them into CID attachments (src="cid:...") so email clients render them reliably instead of blocking inline data URIs.
Allowed formats: Raster images only (png, jpeg/jpg, gif, webp). image/svg+xml is rejected.
Max inline images:5 per email
Max size per inline image:2 MB
Max cumulative inline images:5 MB (and counted toward the 18 MB total message attachment budget)