An order confirmation email tells a customer that the store received their order and shows exactly what they bought, what they paid, where it is going and what happens next. It should be sent within seconds of the order being placed, from an authenticated domain, with the order number, items, totals, delivery address, shipping method and support contact. It is a transactional message: customers expect it, rely on it and contact support when it fails to arrive.
This guide covers the content to include, a template you can adapt, how to trigger and send it reliably, how much promotional content is sensible, and how to diagnose confirmations that arrive late or not at all.
What to include
| Element | Details | Why it matters |
|---|---|---|
| Subject line | Order number and store name, for example: Your order #10482 is confirmed | Easy to find later in search |
| Greeting and confirmation | Thank the customer and confirm the order was received | Reassurance |
| Order summary | Item name, variant, quantity, unit price and line total, with small thumbnails if you use images | Lets customers spot errors immediately |
| Totals | Subtotal, discounts, shipping, taxes, total and currency | Required for trust and often for accounting |
| Payment summary | Method and last four digits only. Never include full card numbers | Reduces disputes without exposing data |
| Delivery details | Shipping address, method and estimated timing | Prevents wrong-address surprises |
| Billing details | Billing address and tax identifiers where required | Supports invoices. See invoice emails |
| Next steps | What happens next and when a tracking email will follow | Fewer support tickets |
| Order access | Link to the order status page or account | Self service |
| Support contact | Reply address, help page and hours | Customers need a fast path |
| Legal footer | Business name, address, returns policy link | Often required for commerce. Check your local rules, this is not legal advice |
Send plain text and HTML together as a multipart message so that the order is readable in any client. See plain text email. Keep all key facts in real text, not in images, so that the email is useful when images are blocked.
Template to adapt
<table role="presentation" width="100%" cellspacing="0" cellpadding="0" style="max-width:600px;margin:0 auto;font-family:Arial,Helvetica,sans-serif;color:#222;">
<tr><td style="padding:24px 0;font-size:20px;font-weight:bold;">{{store_name}}</td></tr>
<tr><td style="font-size:16px;">
<p>Hi {{first_name|there}}, thanks for your order. We have received it and will email you again when it ships.</p>
<p><strong>Order {{order_number}}</strong><br>Placed {{order_date}}</p>
</td></tr>
<tr><td>
<table role="presentation" width="100%" cellspacing="0" cellpadding="6" style="border-top:1px solid #ddd;">
{{#items}}
<tr><td>{{name}} ({{variant}}) x {{qty}}</td><td align="right">{{line_total}}</td></tr>
{{/items}}
<tr><td align="right">Shipping</td><td align="right">{{shipping}}</td></tr>
<tr><td align="right">Tax</td><td align="right">{{tax}}</td></tr>
<tr><td align="right"><strong>Total</strong></td><td align="right"><strong>{{total}}</strong></td></tr>
</table>
</td></tr>
<tr><td style="font-size:14px;padding-top:16px;">
<p><strong>Ships to</strong><br>{{shipping_address}}</p>
<p><a href="{{order_status_url}}">View your order</a></p>
<p>Questions? Reply to this email or visit {{help_url}}.</p>
</td></tr>
<tr><td style="font-size:12px;color:#666;padding:24px 0;">{{legal_name}}, {{postal_address}}</td></tr>
</table>The curly-brace placeholders belong to whichever template engine you use. Provide fallbacks for optional fields, and test with long product names, many items, non-Latin characters and an order with a discount. See personalisation and fallbacks, and UTF-8 encoding. More message types are covered in transactional email examples.
Trigger and send it reliably
- Create the email job inside the same database transaction that records the order, or immediately after commit, so that no order exists without a pending confirmation.
- Push the job to a queue and send from a worker. The checkout request should never wait on an SMTP connection.
- Give each message a stable idempotency key such as
order-10482-confirmation, so a retry cannot produce duplicate emails. See idempotency and retries. - Retry with backoff on temporary failures (4xx responses) and alert on permanent ones. See rate limits and backoff.
- Record the provider message ID against the order, so support can trace a missing email. See tracing messages.
- Consume delivery and bounce events through webhooks and surface failures in the admin. See delivery webhooks.
A minimal API call from an order worker looks like the following. Field names are described in the API reference.
curl -sS -X POST https://api.migosmtp.com/v1/send \
-H "Authorization: Bearer $MIGOSMTP_API_KEY" \
-H "Content-Type: application/json" \
--data @order-10482-confirmation.jsonDeliverability for order emails
Order confirmations get opened because customers want them, which makes them valuable to your reputation. Protect them. Authenticate the sending domain with SPF, DKIM and DMARC, using the steps in authenticating your sending domain. Keep transactional mail on a separate stream or subdomain from promotions, so that a marketing complaint cannot slow order mail. See separating streams. Validate addresses at checkout to catch typos, because a mistyped address means a lost confirmation and a support ticket. See typo domains.
How much marketing is acceptable?
Customers open order confirmations and read them carefully, so it is tempting to add offers. A small block of related products or a referral link below the order details is common, but keep the transaction information first and dominant. Heavy promotional content can move the message toward marketing treatment, which affects consent and unsubscribe rules in some places, and it can make filters treat the mail like a campaign. The rules differ by jurisdiction. This is not legal advice, so check your local requirements, summarised in marketing email laws overview. A safe rule is that every message should still make sense if the promotional block is removed.
Variations for different order types
| Order type | Adjust the confirmation to include |
|---|---|
| Physical goods | Delivery estimate, carrier if known, returns summary and a note that a shipping email will follow |
| Digital goods | Download or access link, licence key where applicable and instructions for reinstalling |
| Subscriptions | Plan, billing cycle, next charge date and how to cancel or change the plan |
| Pre-orders | Expected ship date, when the card will be charged and how to cancel |
| Cash on delivery | Amount due at delivery, a phone number for the courier and how to reschedule |
| Partial shipments | Which items ship now and which later, with a separate shipping email per parcel |
Handle edits and cancellations as their own messages that reference the original order number, rather than resending the confirmation. A customer who changes an address needs to see the new address in the update, and a cancellation should state whether and when a refund will appear. Keep wording factual and consistent across these messages, and keep the same sender identity so they thread naturally in the inbox. See email threading.
Testing before launch
Test the confirmation with realistic data, not a tidy demo order. Place orders with a single item, forty items, a long product name, a discount code, a gift message, a non-Latin name and an address with an apartment line. Render the email in the main desktop, webmail and mobile clients, in dark mode and with images off. See rendering tests and dark mode. Run the message through a spam checker and read the authentication results in the received headers of a test copy. Use a staging environment that cannot mail real customers. See staging and sandbox testing.
Troubleshooting
| Problem | Likely cause | Fix |
|---|---|---|
| Confirmation arrives minutes late | Batch sending, queue backlog or provider throttling | Trigger per order and monitor queue age. See email delay causes |
| Customer says nothing arrived | Typo, spam folder, bounce | Check the bounce event, then ask them to check junk. See delivered but not received |
| Two confirmations arrive | Retry without idempotency or a double submit | Add an idempotency key and deduplicate by order |
| Lands in spam | No authentication or low domain reputation | Fix SPF, DKIM, DMARC and review content |
| Totals or names look wrong | Template reading stale data | Render from the saved order record |
| Broken characters | Wrong encoding | Use UTF-8 end to end |
| Images missing | Images blocked or hosted incorrectly | Keep critical details in text. See blocked images |
Next steps
Start with the content checklist, then make the trigger reliable, then add monitoring. Send a test order through the full path after every release of your checkout or email code, and keep one real inbox at each of the major providers to confirm placement. Treat the confirmation as part of the product: if it fails, customers notice immediately.
Send order confirmations through a reliable relay Use the email API or SMTP relay with delivery, bounce and complaint events.
References and further reading
Frequently asked questions
What should an order confirmation email include?
Order number, items with prices, totals, taxes, shipping address and method, a payment summary, an order status link and a support contact.
How fast should an order confirmation be sent?
Within seconds of the order, triggered by the order event and sent from a queue so that checkout never waits on email.
Can I add promotions to an order confirmation?
A small related-products block is common, but keep order details first. Rules differ by region, so check local requirements.
Why do customers not receive order confirmations?
Typical causes are mistyped addresses, missing SPF, DKIM or DMARC, spam filtering, queue delays and bounces.
How do I avoid duplicate order emails?
Give each message a stable idempotency key per order and deduplicate before sending so retries are safe.