TemplatesNotifications

Notification email template

The plain one: a headline, a line of detail, an optional quote and a link.

From
Northwind <[email protected]>
Subject
Jonas commented on the launch plan
Preview text
Jonas commented on the launch plan
Preview of the Notification template
notification.txt
{{headline}}

{{headline}}

{{body}}

{{quoteAuthor}}

{{quoteBody}}

{{actionLabel}} [{{actionUrl}}]

{{footerNote}}

Shown with sample values. The HTML and plain-text tabs keep the placeholders.

About

When to send it

A general notice for comments, mentions, status changes and anything else that needs a headline and one action. The quote block is optional, and the button label is yours to set.

8 values to fill

What each send fills in

Required values have to come with every send. The rest fall back to the default shown here.

PlaceholderKindRequiredDefault
{{headline}}TextRequiredNone
{{body}}TextRequiredNone
{{quoteAuthor}}TextOptionalNone
{{quoteBody}}TextOptionalNone
{{actionLabel}}TextOptionalOpen
{{actionUrl}}LinkRequiredNone
{{footerNote}}TextOptionalYou are receiving this because of your notification settings.
{{unsubscribeUrl}}LinkOptionalNone

API

Send it from your code

Create a template from this design once, then send it with the values for each message.

import { init, nextmail } from '@nextmail/sdk' init({ apiKey: process.env.NEXTMAIL_API_KEY }) await nextmail.templates.create({  name: 'Notification',  slug: 'notification',  starter: 'notification',  publish: true,}) const sent = await nextmail.templates.send('notification', {  from: 'Northwind <[email protected]>',  to: '[email protected]',  props: {    headline: 'Jonas commented on the launch plan',    body: 'He left a note on the pricing section and asked for a second pair of eyes before Friday.',    quoteAuthor: 'Jonas Weber',    quoteBody: 'Can we test the annual price before we commit to it?',    actionUrl: 'https://example.com/docs/launch-plan',  },}) console.log(sent.id, sent.status)

Notifications

More templates like this

Preview of the Digest template

Digest

A periodic summary of three items, with one link at the end.

6 styles
Preview of the Booking confirmed template

Booking confirmed

An appointment confirmation with the time zone spelled out and a link to reschedule.

6 styles
Preview of the Feedback request template

Feedback request

Asks about one named order or conversation, and only once.

6 styles
Preview of the Product announcement template

Product announcement

Release notes with a cover image, a lead paragraph and three numbered changes.

6 styles

Start from one

Pick a design, change anything,
and send it from your code.

Every template opens in the editor as blocks you can move, restyle or delete, and sends through the API with the values filled in.