# Email notification settings

To manage your form's email notification settings, open its `Settings` section and expand `Notifications` under `Emails`.

## Recipients

- You can enable/disable email notifications for your workspace's team members.
- You can add guests to send email notifications to people outside your workspace/organization.

A guest receives a confirmation email first, and nothing else until they accept it. The recipient list shows a guest who has not accepted yet as pending.

![Email notification settings](https://documentation.formspark.io/email-notification-settings.png)

## Threading

Email threading is on by default, so your mail client groups a form's notifications into one conversation.

Turn it off to receive each submission as a separate email.

## Custom templates

You can customize the notification email template of a form.

Templates are designed in a visual editor, built in partnership with [Postcraft](https://postcraft.io/).

A custom template goes out exactly as you designed it to every recipient, team member or guest. Formspark adds no footer and no unsubscribe link, so when a guest asks to stop receiving it, remove them from the recipients.

Every custom template passes a content check. If the check pauses yours, the form sends no notifications and its settings say so. Contact support to have it reviewed, or press `Revert to default` to go back to the default template.

Dynamic values in a template use the [Handlebars](https://handlebarsjs.com/) templating language.

A template can also set the email's subject line, with the same dynamic values as the body. An `_email.subject` field in the submission takes precedence over it.

```handlebars
<div style="text-align: left;">
  <strong>New submission:</strong>
  <div style="margin: 16px 0;">
    <strong>First name</strong>:
    {{data.firstName}}
  </div>
  <strong>Last name</strong>:
  {{data.lastName}}
</div>
```

### Custom Handlebars helpers

The following custom Handlebars helpers have been registered for you:

| Name                          | Description                                                                                                                                                                                                                                | Example usage                                                                                                                                                                               |
| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `capitalize`                  | Capitalizes the first character of a string and lowercases the rest.                                                                                                                                                                       | <span v-pre>`{{capitalize "hello world"}}`</span> → `Hello world`                                                                                                                           |
| `nl2br`                       | Converts newlines in a string into `<br>` HTML tags, so line breaks display correctly in HTML.                                                                                                                                             | <span v-pre>`{{nl2br user.comment}}`</span> → `Line one<br>Line two`                                                                                                                        |
| `pluralize`                   | Returns the singular or plural form of a word based on a count. Optionally accepts a custom plural form.                                                                                                                                   | <span v-pre>`{{pluralize 1 "item"}}`</span> → `1 item`<br><span v-pre>`{{pluralize 3 "item"}}`</span> → `3 items`<br><span v-pre>`{{pluralize 2 "child" "children"}}`</span> → `2 children` |
| `sanitizeUrl`                 | Returns the given URL only if it uses a safe scheme (`http(s)`, `mailto`, `tel`, a relative path, or an anchor); otherwise returns `#`. Use it around links built from submitted data so an unsafe value can't render a clickable exploit. | <span v-pre>`{{sanitizeUrl viewLink}}`</span> → `https://example.com` (or `#` if unsafe)                                                                                                    |
| `stringify`                   | Serializes a value to a JSON string. Supports optional indentation for pretty-printing.                                                                                                                                                    | <span v-pre>`{{stringify data}}`</span> → `{"name":"Alice","age":30}`<br><span v-pre>`{{stringify data indent=2}}`</span> → pretty-printed JSON                                             |
| `switch` / `case` / `default` | Block helper for matching a value against multiple cases. Renders the content of the matching `case` block, or the `default` block if no case matches.                                                                                     | <span v-pre>`{{#switch type}}{{#case "a"}}A{{/case}}{{#case "b"}}B{{/case}}{{#default}}Other{{/default}}{{/switch}}`</span>                                                                 |
| `titleCase`                   | Capitalizes the first letter of every word in a string.                                                                                                                                                                                    | <span v-pre>`{{titleCase "hello world from the team"}}`</span> → `Hello World From The Team`                                                                                                |
