All guides

TRANSACTIONAL EMAIL · 4 min read

Sending transactional email from an application

What to plan when adding receipts, verification messages, and account alerts through an email API.

Keep email close to the event that created it

Transactional email is triggered by a product action: an account was created, a payment was recorded, or a user requested a verification link. An API lets the product pass the message to an email service at that moment.

MailAfrica's outbound endpoint accepts messages from your application and records send history for later inspection.

Choose and verify the sender identity

You can send using MailAfrica's platform sender or add a domain you control. A custom sending domain needs the DNS authentication records supplied by MailAfrica, including DKIM, SPF, and DMARC.

After verification, use the default sender address or another sender address configured for that domain. Verify the domain before relying on it for customer-facing email.

Protect the API credential

Make outbound requests from server-side code. Store the API key in your deployment's secret manager and avoid shipping it in browser JavaScript, mobile binaries, public repositories, or logs.

Use a template for repeated message structure and pass user-specific values at send time. Check the response and retain an application-level event if your workflow needs to connect a send to a business record.

Check message history

A message accepted for sending is not the same as a guarantee that it reached a person's inbox. Inspect the message and recipient status when troubleshooting. Keep your domain authentication and sending reputation in good standing.

Product details can change. Check the current MailAfrica API documentation for endpoint behavior and payload schemas.

Explore developer tools

Ready to put this workflow into your product?

Start with the MailAfrica API documentation and test your email before sending live.

Get started