Email templates

#Activate Account Email Template

This email is sent to new users to activate their account. Use the url and ticket variables (<a href="{{ url }}/auth/activate?ticket={{ ticket }}">Activate your account</a>) to let users activate their account.

This email is sent only if the setting User registration auto active is off and Require to verify new emails when user change email is on.

Change those settings under Settings -> Auth in the Nhost console.

Variables

  • display_name - user's display name.
  • ticket - UUID token to activate the user's account.
  • url - Backend server URL, usually https://backend-xxx.nhost.app.

#Password Reset Email Template

Email to users requesting to change their password, usually because the user has forgot their current password.

The URL in this email should go to your app with a form to change the user's password. Use the ticket to authenticate the password change request.

Variables

  • ticket - UUID token to change password.

#Change Email Email Template

Email for users requesting to change their current email. This email is sent to the new email address the user wants to change to, in order to confirm the new email address.

The URL in this email should go to your app. Your app should receive the ticket and change the email.

Variables

  • ticket - UUID token used to change email.

#How To Use Variables in Email Templates

Use variables in email-templatest with curly brackets.

<p>Hi {{ display_name }}</p>
<p>
  <a href="{{ url }}/auth/activate?ticket={{ ticket }}">
    Activate your account
  </a>
</p>

#SMTP Settings

By default, all emails are sent with Nhost's SMTP settings from nhost.app using Sendgrid. You can change the SMTP settings to your own at Settings -> SMTP.

#More Settings

Verify emails

Send emails to verify (activate) a new account and verify a new email a user whish to change to.

If Verify emails is disabled, Nhost won't send an activation email to new users nor send emails when a user whish to change their email. For user activation, you need to handle that your self (if you don't automatically activate new users). For email change, the email will be changed instantly with out verification.

HIBP

If activated, passwords will be checked against HIBP (haveibeenpwned.com). Weak and compromised passwords will not be accepted.