Transactional
Email Types

Transactional Email

/tran-zak-shuh-nl ee-mayl/

Transactional emails are automated messages triggered by user actions or system events. They include password resets, order confirmations, shipping notifications, and account alerts.

What is Transactional Email?

Transactional emails are automated messages sent in response to specific user actions or system events. Unlike marketing emails, they deliver essential information that recipients expect and need.

Key Characteristics

  • Triggered by action: Sent in response to something the user did
  • Expected by recipient: User anticipates receiving it
  • Contains essential information: Not promotional content
  • One-to-one communication: Personalized to individual recipient
  • Time-sensitive: Often needs to arrive immediately

Types of Transactional Emails

Authentication & Security

Email TypeTrigger
Welcome emailUser creates account
Email verificationUser needs to confirm email
Password resetUser requests password change
Two-factor authenticationUser logging in with 2FA
Security alertSuspicious login detected
Session notificationNew device login

E-commerce

Email TypeTrigger
Order confirmationPurchase completed
Payment receiptPayment processed
Shipping notificationOrder shipped
Delivery confirmationOrder delivered
Refund notificationRefund processed
Abandoned cartCart left unpurchased

Account Management

Email TypeTrigger
Subscription confirmationPlan purchased
Billing receiptPayment charged
Plan change confirmationUpgrade/downgrade
Cancellation confirmationSubscription canceled
Trial endingTrial period expiring
Account suspendedPayment failed

Application Notifications

Email TypeTrigger
Comment notificationSomeone replied
Mention notificationUser was mentioned
InvitationUser invited to team/project
Export readyData export completed
Usage alertApproaching usage limit
System maintenanceScheduled downtime

Transactional vs Marketing Email

AspectTransactionalMarketing
PurposeDeliver expected informationPromote products/content
TriggerUser action or system eventMarketing calendar
ConsentImplicit (user expects it)Explicit opt-in required
UnsubscribeNot required (in most cases)Legally required
FrequencyBased on user behaviorScheduled campaigns
ContentAccount/order specificPromotional
PriorityHigh (must reach inbox)Medium (can filter)

CAN-SPAM (US)

Transactional emails are exempt from most CAN-SPAM requirements if they meet the criteria:

  • Primary purpose is transactional
  • Contains relationship-based content
  • Not primarily advertising

However, if you include promotional content, the entire email may be classified as marketing.

GDPR (EU)

Transactional emails are generally permitted under "legitimate interest" or "contractual necessity" without explicit consent. However:

  • Only send what's necessary
  • Don't include unrelated marketing
  • Respect data minimization principles

Best Practice

Keep transactional emails focused on their purpose. If you want to include promotions (like product recommendations in an order confirmation), clearly separate transactional and promotional content.

Sending Transactional Email

Using Transactional

import { Transactional } from '@transactional/sdk';
 
const client = new Transactional({
  apiKey: process.env.TRANSACTIONAL_API_KEY,
});
 
// Password reset email
async function sendPasswordReset(user: User, resetToken: string) {
  const resetUrl = `https://app.example.com/reset?token=${resetToken}`;
 
  const { data, error } = await client.emails.send({
    from: 'security@example.com',
    to: user.email,
    subject: 'Reset your password',
    html: `
      <h1>Password Reset</h1>
      <p>Hi ${user.name},</p>
      <p>Click the link below to reset your password:</p>
      <a href="${resetUrl}">Reset Password</a>
      <p>This link expires in 1 hour.</p>
    `,
    text: `Reset your password: ${resetUrl}`,
    tags: ['password-reset'],
  });
 
  if (error) {
    console.error('Failed to send reset email:', error);
    throw new Error('Could not send password reset email');
  }
 
  return data.id;
}

Using Templates

For consistent branding and easier maintenance, use templates:

const { data, error } = await client.emails.send({
  from: 'orders@store.com',
  to: customer.email,
  templateId: 'order-confirmation',
  templateData: {
    customerName: customer.name,
    orderId: order.id,
    orderItems: order.items,
    orderTotal: order.total,
    shippingAddress: order.address,
  },
});

Best Practices

1. Send Immediately

Transactional emails should be sent within seconds of the triggering event. Users expect instant delivery for password resets, order confirmations, and verification emails.

2. Use a Separate Sending Domain

Consider using a subdomain for transactional emails (e.g., mail.example.com) separate from marketing emails. This protects your transactional deliverability if marketing campaigns cause reputation issues.

3. Include Essential Information Only

Don't clutter transactional emails with unnecessary content. Include:

  • What happened
  • What (if anything) the user needs to do
  • How to get help

4. Make Actions Clear

If the email requires action, make the primary CTA prominent and clear. Use buttons instead of text links.

5. Provide Plain Text

Always include a plain text version. Some users prefer text-only email clients, and it improves deliverability.

6. Test Delivery

Monitor delivery rates for transactional emails. A password reset that goes to spam is a failed product experience.

Deliverability for Transactional Email

Transactional emails typically have better deliverability than marketing emails because:

  • Recipients expect and want them
  • They have higher engagement (opens, clicks)
  • They're one-to-one, not bulk sends

To maintain high deliverability:

  • Authenticate with SPF, DKIM, and DMARC
  • Monitor bounce rates and remove invalid addresses
  • Keep complaint rates near zero
  • Use dedicated IPs or trusted providers
  • Avoid spam trigger words even in transactional content
EXAMPLES

See It in Action

Sending a Transactional Email

Example of sending an order confirmation email

await client.emails.send({
  from: 'orders@store.com',
  to: customer.email,
  subject: `Order #${order.id} Confirmed`,
  html: renderOrderConfirmation(order),
});

Learn More in Documentation