Customize the emails your users receive
Edit the subject, wording, sender name and button colour of sign-in, verification and reset emails, with a live preview.
Your project sends five kinds of email on behalf of your app. Each goes out as a designed HTML email with a plain-text copy. You can keep the defaults or write your own wording.
Edit an email
- Open Authentication and choose Settings.
- Open the Emails tab.
- In the Email list, pick one of: Email verification, Magic link, One-time code, Password reset or Password changed notice.
- Edit the Subject and Message. Leave them blank to use the designed default.
- Choose Save changes.
A preview below the form updates as you type, so you can see exactly what users will get.
Make it yours
- Sender name: the name people see in their inbox. It defaults to your project name and can be up to 60 characters.
- Button colour: a hex colour such as
#0f766e. It must be dark enough for white button text. If it is too light, the save is refused with a message asking for a darker colour. - Link path: for emails that contain a link (verification, magic link and password reset), the path added to your Site URL. You can use
{token},{type}and{email}in it, for example/auth/confirm?token={token}.
Placeholders
Insert placeholders in the subject or message by choosing one of the Insert chips. They are written with double curly braces.
| Placeholder | Available in |
|---|---|
{{email}}, {{project_name}} |
Every email |
{{link}}, {{token}}, {{link_or_token}} |
Email verification, Magic link, Password reset |
{{code}} |
One-time code |
{{expires_in}} (for example "10 minutes") |
Verification, Magic link, One-time code, Password reset |
{{time}} |
Password changed notice |
{{link_or_token}} is the link when your project has a Site URL, and the token otherwise, so one template works either way. A placeholder that is not in the list for that email, or a stray {{, is rejected when you save.
Limits: the subject must be a single line of at most 200 characters, and the message at most 5000 characters.
Check it in a real inbox
Choose Email me this one to send the saved version of the selected email to yourself. The code or link in a test email is a sample and will not work. Use Use the default wording to clear your changes for that email.
Send from your own domain
By default these emails come from PGB's address. To send them from [email protected] instead, see Send authentication emails from your own domain.
Good to know
- Nothing in a template is ever executed. Placeholders are only substituted, and values are escaped in the HTML version.
- Email wording is per project. If you run several projects, set each one up.
- If your account's email sending is not approved for production, sign-in emails may only reach approved addresses. See Request approval to send email.
More guides in Console: authentication
Authentication in your project: users, settings and the Playground
What built-in authentication gives your app, and a tour of the Authentication page in the Console.
Choose sign-in methods and password rules
Turn sign-in methods on or off, set password rules and session lifetimes, and decide whether email must be verified.
Email verification and password reset
How confirmation emails and password resets work, and how to wire the links into your app.
Send authentication emails from your own domain
Add and verify a sending domain so sign-in, verification and reset emails show your brand and address.
Add social login with Google or GitHub
Register your app with a provider, paste its credentials into the Console, and let people sign in with an account they already have.
Two-factor sign-in for your app's users
How your users can protect their accounts with an authenticator app, and how you test and reset it.