Identity-generated emails

Some Netlify Identity actions, like inviting an Identity user or resetting a password, will trigger an email to the user. You can customize the email sender address, as well as the templates used.

Custom sender address

This feature may not be available at all levels.

By default, all Identity-generated emails are sent from no-reply@netlify.com. If you’d like these emails sent from your own custom address, you can connect a third-party email provider that supports SMTP.

Which email providers support SMTP?

SMTP is a common protocol supported by nearly all email service providers. If your site triggers a low number of Identity-generated emails, you may be able to use a regular email account. (Check with your provider for SMTP support and sending limits.) For larger volumes, you’ll need to use a dedicated transactional email service like SendGrid, Mailjet, or SendinBlue.

Refer to your email provider’s documentation to find the proper values for your SMTP server hostname, port, username, and password. Then enter these values into your Netlify site dashboard under Settings > Identity > Emails > Outgoing email address.

Email templates

All Identity-generated emails have basic templates built in. You may customize them by creating new templates and publishing them to a path on your deployed site, then specifying the path to the template file (relative to the site domain, starting with a /) in Settings > Identity > Emails.

When writing a template, you may use any email-ready HTML. CSS must be included inline, and images must use absolute links.

You may include certain variables using Go template syntax, like {{ .SiteURL }}. The following variables are available:

  • {{ .SiteURL }}: URL of your site
  • {{ .ConfirmationURL }}: site URL with corresponding email action parameters appended
  • {{ .Email }}: user’s current registered email address
  • {{ .NewEmail }} (email change template only): new email address the Identity user would like to use in place of the current address
  • {{ .Token }}: The token needed to confirm the action. To customize the path the emails link to you can use the following patterns:
    # Invitation: 
    {{ .SiteURL }}/some/path/#invite_token={{ .Token }}
    
    # Confirmation:
    {{ .SiteURL }}/some/path/#confirmation_token={{ .Token }}
    
    # Password recovery: 
    {{ .SiteURL }}/some/path/#recovery_token={{ .Token }}
    
    # Email change:
    {{ .SiteURL }}/some/path/#email_change_token={{ .Token }}
    
    

You may change the email subject line directly in the settings UI.

Default templates

Default email templates are as follows:

Invitation

<h2>You have been invited</h2>

<p>You have been invited to create a user on {{ .SiteURL }}. Follow this link to accept the invite:</p>
<p><a href="{{ .ConfirmationURL }}">Accept the invite</a></p>

Confirmation

<h2>Confirm your signup</h2>

<p>Follow this link to confirm your user:</p>
<p><a href="{{ .ConfirmationURL }}">Confirm your mail</a></p>

Password recovery

<h2>Reset Password</h2>

<p>Follow this link to reset the password for your user:</p>
<p><a href="{{ .ConfirmationURL }}">Reset Password</a></p>

Email change

<h2>Confirm Change of Email</h2>

<p>Follow this link to confirm the update of your email from {{ .Email }} to {{ .NewEmail }}:</p>
<p><a href="{{ .ConfirmationURL }}">Change Email</a></p>