Contents
The task
An online store needs order confirmations, payment notifications and offers for subscribers. A promotional campaign should not consume the sending capacity reserved for critical notifications, and a network retry should not produce a second message.
The store's application owns the order state while Email API handles message submission and status reporting. Replace the addresses on example.com with addresses on your own domain when connecting.
Separate messages by purpose
A purchase confirmation belongs in the transactional stream. A promotion or product selection belongs in marketing, including when the recipient has bought before. Accepting an order's terms does not itself establish marketing consent.
Use separate keys and sender addresses for the streams. Separate queues and reputation controls help manage campaigns, but restrictions on the shared AWS account remain shared. A dedicated IP is not a prerequisite for this connection design.
Prepare the domain without moving existing mail
Select a verified organization domain in the account. Use notifications@example.com for service messages and offers@news.example.com for marketing. The marketing subdomain is needed when enabling that stream, not for every business mailbox.
Give the DNS administrator the exact records shown in the account. Connecting only Email API does not require changing the MX records of existing mail. Check DKIM and DMARC before launch while preserving other services' valid settings.
Keep consent with the subscriber
The store records the actual source and time of consent, then registers a subscription to a specific topic through the API. Creating a subscription record cannot provide consent on the user's behalf. Purchased lists and unsolicited campaigns do not fit this design.
Mailcore adds the marketing unsubscribe mechanism. The application must account for unsubscribe events, complaints and sending restrictions. Renewed consent must be explicit; a stream name cannot turn an advertisement into a service notification.
Make retries and events reliable
Start with a test key, which simulates submission without real messages or package usage. Live sending requires a paid package, ready DNS and a live key for the correct stream.
Persist an Idempotency-Key with each order event and reuse it for an identical request retry. Verify webhook signatures and handle repeated event deliveries. API acceptance, acceptance by the recipient's mail server and reading the message are different facts.
Acceptance criteria
- Retrying a confirmation request creates no second message or second charge.
- Marketing keys are kept separate from order notifications.
- A recipient who unsubscribes receives no next campaign for that topic.
- Delivery failures and complaints are available for investigation.
- The application handles an exhausted package without retrying indefinitely.
Where to start
List order events separately from subscription topics. Connect one verified domain, then test both streams and failure handling against the Email API documentation before the first live campaign.