Welcome email: the first message after signup
Updated
A welcome email confirms the account exists and points the user at their first useful step. It is also the first message a mailbox provider sees from your domain for that user, so it sets expectations.
When it fires
On the event "email verified", not on "account created". If you send both a verification and a welcome email at signup, the user gets two messages in a minute and one of them is ignored.
Workflow
- User verifies their address (verification flow).
- Your verification handler flips
verified = trueand publishes auser.verifiedevent. - A handler sends the welcome email.
- Longer onboarding, such as a five-day sequence, belongs in an automation journey, where delays and conditions are built in. The API call is for the first message only.
Implementation (Node.js 18+)
export async function onUserVerified(user) {
const res = await fetch("https://api.inboxili.com/api/v1/transactional/send", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.INBOXILI_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
to: user.email,
from_email: "hello@yourdomain.com",
from_name: "Acme",
template_id: process.env.WELCOME_TEMPLATE_ID,
template_data: { first_name: user.firstName, dashboard_url: "https://app.yourdomain.com" },
}),
});
if (!res.ok) {
const { error } = await res.json().catch(() => ({}));
// A missed welcome email should never block signup: log and move on.
console.error("welcome email failed", res.status, error?.code, error?.message);
}
}
With template_id and no subject, the subject defaults to the template's name, so name the template the way you want the subject line to read, or pass subject explicitly.
Sample email
Subject: Welcome to Acme, Ada Your account is ready. Here are the two things most people do first: connect your domain and send a test message. Open your dashboard
Things that go wrong
- Blocking signup on the email call. Make it a background job or fire-and-forget with logging.
- Unfilled merge tags. A tag with no matching key in
template_datais sent literally as{{first_name}}. Provide fallbacks for optional fields. - Resending on every login. Guard with a
welcome_sent_atcolumn.
Delivery events
Watch bounced here too. Welcome mail to a verified address rarely bounces, so a bounce means the mailbox has since closed.
Deliverability notes
Use the same From address as your other account mail. Include a plain, working link back to your product, not tracked redirects you have not tested.
Frequently asked questions
- Is a welcome email transactional or marketing?
- It is usually treated as transactional when it confirms the account and tells the user what to do next. Adding promotions moves it toward marketing, so keep onboarding content factual.
- Should I send it before verification?
- No. Send it after the address is verified, so you are not mailing someone who mistyped.
Send your first welcome email
Create a workspace, verify a domain, and make your first API call.