Account and password e-mails: welcome, address confirmation, new sign-in alerts and one-time reset links

E-mailSMTP Relay & Transactional·· 36 views· 4 min read

The short answer: there are four e-mails that go out the moment the person does something: creates the account, confirms the address, signs in or asks for a new password. They go out straight away, with no send_at, each from its own template. The one-time link and its expiry are created by your system: Email Center delivers the e-mail; it does not store or check passwords.

The four e-mails

E-mail When it goes out What it carries What it never carries
Welcome Right after the account is created The name, how to sign in and where to get help The password
Address confirmation After sign-up, or when the person changes the e-mail A confirmation link, with an expiry Other account details
New sign-in When your system sees a sign-in from a new device Date, time, device and what to do if it was not them A link to sign in
Password reset Right after the request A one-time link with a short expiry The password, old or new

The password reset, step by step

1 Your system creates a random code, stores it with the time of the request and builds the link, such as https://www.yourcompany.co.mz/reset-password?token=....
2 It sends the e-mail with the reset template, with {{name}} and {{link}} in variables (example below).
3 When the person opens the link, your system checks the expiry, for example 30 minutes, and deletes the code: the link does not work a second time.
4 On screen, always show the same sentence, such as "if the address has an account, we have sent a link", whether or not the account exists. That way nobody uses the form to find out who is a customer.

curl https://api.mozout.co.mz/v1/email/messages \
-H "Authorization: Bearer sandbox_..." \
-H "Content-Type: application/json" \
-H "Idempotency-Key: reset-joao-20261125-1012" \
-d '{"from": "Your Company <account@yourcompany.co.mz>",
"to": "joao.fernandes@example.co.mz",
"template_id": 14,
"variables": {"name": "João",
"link": "https://www.yourcompany.co.mz/reset-password?token=..."}}'

Wrong and suppressed addresses

If the address has a typo, the e-mail bounces (bounced). With a permanent bounce, the address goes on the suppression list and stops receiving. If a request only has suppressed addresses, the API answers 422 with the reason all_recipients_suppressed. In that case your system should ask the person to check the address, instead of saying the e-mail was sent.

Through the webhook, the email.bounced event reaches your system, which can mark the account’s e-mail as unconfirmed.

What the customer types goes in as text

In the HTML, variable values are escaped: a name with < or & shows as text, not as code. That is what you want in these e-mails, because the name comes from a form that anyone can fill in. See templates with variables.

The content of each e-mail stays in the Email Center log for 30 days. That is why the reset link should work for a short time and only once: anyone who reads it in the log after that can no longer use it. And the password never goes in the e-mail. See the Email Center log.
Always use the same sender for these e-mails, such as account@yourcompany.co.mz. Customers learn to recognise it and spot an imitation sooner. See how to recognise a phishing e-mail.

Want account and password e-mails to go out from your system on their own? See the Transactional E-mail page.

See Transactional E-mail

SEE ALSO

Transactional e-mail templates with variables: write once, fill in each customer's details

The Email Center suppression list: why an address stops receiving and how to remove it

Email Center webhooks: receiving delivery, bounce and complaint events in your system

The Email Center log: finding an e-mail, filtering it and why the content goes after 30 days

Password reset, order and invoice e-mails: what a good transactional message says, with examples

How to recognise a phishing e-mail or message, and what to do if you clicked

RECOMMENDED PRODUCT

Professional e-mail on your domain

Mailboxes in your company name, no adverts, with spam filtering. from $6.60/mo (3-year plan, with coupon)

See plans
Was this answer helpful? Your answer helps us improve this article.