Mass mail (ZeptoMail)
/nl/tools/mass-mail sends one message to a list of recipients through ZeptoMail. Every recipient gets a separate email: nobody sees anyone else's address, and {{naam}} is filled in with each recipient's own name.
Setup
The tool needs two secrets per environment (Vercel → Settings → Environment Variables, or .env locally):
| Variable | What it is |
|---|---|
NUXT_MASS_MAIL_ACCESS_TOKEN | The access code the page asks for. At least 16 characters (openssl rand -base64 24). Without it, or with a shorter one, the tool is off and its API answers 404. |
NUXT_ZEPTOMAIL_TOKEN | ZeptoMail → Mail Agents → (agent) → SMTP/API → Send Mail Token, with or without the Zoho-enczapikey prefix. Without it the page opens and previews, but cannot send. |
Optional:
| Variable | Default |
|---|---|
NUXT_ZEPTOMAIL_API_URL | https://api.zeptomail.eu/v1.1 (EU data centre; an account on zeptomail.com uses https://api.zeptomail.com/v1.1) |
NUXT_ZEPTOMAIL_FROM_ADDRESS | noreply@ongehoord.nl, must be on a domain verified in ZeptoMail |
NUXT_ZEPTOMAIL_FROM_NAME | Ongehoord |
NUXT_ZEPTOMAIL_REPLY_TO | empty: replies go to NUXT_MAIL_TO (info@ongehoord.nl) |
Environment variables are read at runtime, but Vercel only hands new values to a new deployment: redeploy after changing them.
Sending a mailing
Open the page and enter the access code. It is remembered until the tab closes.
Recipients: paste a list, or import a CSV. Any of these works, mixed freely:
- one address per line, or separated by commas or semicolons
Jan Jansen <jan@example.nl>, as copied from a mail client- spreadsheet or CSV rows:
naam,email,voornaam,achternaam,emailoremail,naam
Repeats are dropped, invalid addresses and lines without an address are listed and skipped.
Subject, optional preview text (the grey line next to the subject in an inbox), format and language (for the footer).
Message. In the default text format a blank line starts a paragraph, and
**bold**,_italic_,# heading,- list,---and[text](https://…)work; bare links become clickable. The message is placed in the Ongehoord frame with a header and a footer that tells people how to unsubscribe (reply with "afmelden"). In HTML format a fragment goes into the same frame; a complete HTML document (with<html>or<body>) is sent unchanged.{{naam}}(or{{name}}) works in the subject and the message. Set When the name is missing for recipients without a name. Any other{{…}}is flagged, because nothing fills it.The preview on the right shows the message as the first recipient gets it, as email and as plain text.
Send test sends the message to one address, subject marked
[Test].Send asks for confirmation, then sends in batches of 500 (ZeptoMail's limit per request), one after the other. The form locks so the same mailing cannot go out twice.
The report shows every batch. Stop after this batch stops between batches; Retry failed (or Resume) sends only what has not gone out yet, so nobody gets a second copy. Copy failed addresses copies the recipients of failed batches. Do not close the tab while a mailing is sending: the browser drives the batches.
Each mailing has a reference like mailing-20261108-1432, sent to ZeptoMail as client_reference. Search for it in ZeptoMail's processed-email logs to see deliveries and bounces; tests use test. Open and click tracking are off.
Good to know
- ZeptoMail is built for transactional email, and its terms do not allow bulk marketing mail. Keep to people who expect to hear from Ongehoord (press, partners, people who asked); an account that collects spam complaints gets suspended, and the sending domain's reputation goes with it.
- There is no subscriber list or unsubscribe link: unsubscribe requests arrive as replies at the reply-to address. Remove those people from the list before the next mailing.
- The recipient list is never stored. The subject and message are kept as a draft in the browser (local storage) until Clear draft.
- A rejected access code or a ZeptoMail refusal shows ZeptoMail's own reason in the report; a wrong
NUXT_ZEPTOMAIL_TOKENreads "Access Denied: Invalid API Token found".
How it fits together
| Part | File |
|---|---|
| Page and components | app/pages/tools/mass-mail.vue, app/components/mass-mail/ |
| State, batching, retry | app/composables/useMassMail.ts |
| Recipient parsing, limits | shared/utils/massMail.ts |
| Email template (preview and send use the same code) | shared/utils/massMailTemplate.ts |
| API | server/api/mass-mail/status.get.ts, server/api/mass-mail/send.post.ts |
| Access check, validation, sending | server/utils/massMail.ts, server/utils/zeptomail.ts |
The access code travels in an x-mass-mail-token header, not Authorization: on acceptance the browser already sends the environment password there. The API responses are no-store and noindex.