SaaS notification emails tell users that something happened in your product that needs them: a mention, a comment on their document, a failed export, an approval waiting. Good ones are rare, specific and actionable. Send email only for events that matter when the user is not in your app, let them choose what they get, batch noisy events into digests, and send through a transactional email API so you can track each type.
Which events deserve an email?
| Event | Email? |
|---|---|
| Security: new login, password or 2FA change | Always, and not optional |
| Billing: payment failed, plan ending | Always |
| Someone mentioned or assigned the user | Yes, immediately |
| A job they started failed | Yes, immediately |
| Comments on their work | Yes, but digest if frequent |
| Likes, views, follows | Rarely; in-app or weekly digest |
| Everything in a busy workspace | No; offer a digest |
A useful test: would the user be annoyed to learn about this only the next time they open the app? If not, it does not need an email.
Best practices
- Preferences per category. “Mentions”, “Comments”, “Weekly summary”. Store them, check them before every send, and link to them from the footer.
- Digest the noisy ones. Collect events for 15 minutes or an hour and send one summary.
- Say what happened in the subject. “Priya mentioned you in Q4 plan” beats “New notification”.
- Deep link. The button goes straight to the comment, not the dashboard.
- Thread by object. Set a stable
Message-IDfor the first email about an object, andIn-Reply-ToandReferenceson later ones (RFC 5322, section 3.6.4). Gmail also uses the subject to group, so keep it the same. - Reply by email. Letting users reply to a comment notification is a strong feature. Route replies with inbound email.
- One-click unsubscribe for optional categories. Add
List-UnsubscribeandList-Unsubscribe-Postheaders that turn off that category only.
Notification email template
From: Acme <notify@notify.acme.com>
Reply-To: reply+c_7d1e@in.acme.com
Subject: Priya mentioned you in "Q4 plan"
Priya Shah mentioned you:
"@Sam can you check the hiring numbers before Friday?"
Reply to this email to answer, or open the comment:
https://app.acme.com/docs/q4-plan#c_7d1e
You get this because mentions are on.
Change email settings: https://app.acme.com/settings/notifications
Sending notifications with Mailcandor
Each notification is one call to the Mailcandor email API. When one event fans out to many users, such as a comment on a shared document, the batch endpoint sends up to 100 personalized emails in one request. Every email in a batch is validated first; if one is wrong, none are sent.
const API = 'https://api.mailcandor.com/v1/emails/batch';
export async function notifyMention(event, recipients) {
const emails = recipients
.filter((u) => u.prefs.mentions) // respect preferences
.map((u) => ({
from: 'Acme <notify@notify.acme.com>',
to: u.email,
reply_to: `reply+${event.replyToken}@in.acme.com`,
subject: `${event.actorName} mentioned you in "${event.docTitle}"`,
html: `<p>${event.actorName} mentioned you:</p><blockquote>${event.excerptHtml}</blockquote>
<p><a href="${event.url}">Open the comment</a></p>
<p><a href="https://app.acme.com/settings/notifications">Change email settings</a></p>`,
text: `${event.actorName} mentioned you:\n\n${event.excerpt}\n\nOpen: ${event.url}`,
headers: {
'In-Reply-To': `<doc-${event.docId}@notify.acme.com>`,
References: `<doc-${event.docId}@notify.acme.com>`,
'List-Unsubscribe': `<https://app.acme.com/u/mentions/${u.unsubToken}>`,
'List-Unsubscribe-Post': 'List-Unsubscribe=One-Click',
},
tags: [{ name: 'notification', value: 'mention' }],
}));
for (let i = 0; i < emails.length; i += 100) {
const res = await fetch(API, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.MAILCANDOR_KEY}`,
'Content-Type': 'application/json',
'Idempotency-Key': `mention-${event.id}-${i}`,
},
body: JSON.stringify(emails.slice(i, i + 100)),
});
if (!res.ok) {
const { error } = await res.json();
throw new Error(`${error.type}: ${error.message}`);
}
}
}
event.excerptHtml must be escaped before it gets here, because it contains user content. The notification tag comes back on every webhook event, so you can chart bounces and complaints per notification type and spot the one users report as spam. Rate limits are per team (5, 10 or 50 requests a second by plan) and every response carries ratelimit-* headers.
Building a digest
A digest needs three pieces, none of them complicated:
- An events table. Write each notifiable event with the user id, category and a
sent_atthat starts empty. - A schedule. A job runs every 15 minutes, hourly or daily, depending on the user’s setting, and picks each user’s unsent events.
- One email per user. Group events by object (“3 new comments on Q4 plan”), link each group, and mark the events sent in the same transaction that records the email id.
Use the user id plus the time window as the idempotency key, for example digest-u42-2026-11-16T14, so a job that crashes and reruns does not send the same digest twice. If a user has nothing new, send nothing: an empty digest teaches people to ignore the next one.
Watch the complaint rate per type
When users click “Report spam” on a notification, it counts against your domain like any marketing complaint. Mailcandor’s fair review process opens a review, rather than suspending you, when complaints pass 0.08% or hard bounces pass about 4%, and gives written reasons and 72 hours to reply. It is better never to get there: if one notification type draws complaints, make it a digest or turn it off by default.
Common pitfalls
- One email per event in busy workspaces. Users get hundreds and filter you out.
- Generic subjects. “You have a new notification” gets ignored and hurts engagement.
- Ignoring preferences in one code path. A background job that forgets to check settings undoes all your preference work.
- No unsubscribe for optional mail. Users who cannot turn it off report it as spam.
- Notifying the actor. Do not email Priya about her own comment.
- Sending from the main domain. Put notifications on a subdomain so their reputation is separate.