One API key and a sender address
Twilio SendGrid is a cloud email delivery service, popular with teams that do not want to run their own mail server, or open an account with a large cloud provider, just to send order confirmations. In Endora Commerce it is one of three providers on the email adapter list, next to SMTP and Amazon SES.
The setup is short: in the admin panel, under credentials, you create a configuration of the “email adapter” type, pick SendGrid as the provider and enter two values, the API key and the sender address. The key is encrypted at rest and is never returned in plain form once saved. The order, returns and company account modules do not know which provider is behind the sending, so moving to SendGrid from your own SMTP server or from Amazon SES means pointing at a different configuration.
Before go-live on the SendGrid side
- An authenticated domain. SendGrid requires a verified sender identity. Verifying a single address is meant for testing; for production the provider recommends domain authentication, which means adding DNS records that cover SPF, DKIM and DMARC. The sender address from the configuration has to belong to that domain.
- A narrowly scoped key. Sending only needs a key with the “Mail” permission. There is no reason for the store to hold a key with full access to the account.
- Tracking. Click tracking in SendGrid rewrites the links in a message so that they go through the provider’s servers or your branded domain. For account verification and order links, it is worth deciding deliberately whether it should be on.
Which messages go through SendGrid
All mail sent in response to events in the store takes this route: order confirmation, order comment and reorder, payment status change, shipment created, the decision on a return, email address verification, organization invitation, and low-stock and back-in-stock notifications.
The content is produced entirely on the platform side. An administrator edits the subject, content and look of each message in the admin panel, globally or separately per sales channel and language, and SendGrid receives finished HTML with a plain-text version. SendGrid dynamic templates are not used, so there are no two sets of templates to maintain.
What the “sent” status means
Every send attempt leaves a record in the platform database: sent, suppressed or failed, with the recipient, the type of message and the time. “Sent” means SendGrid accepted the message. What happened next is visible in the SendGrid dashboard: that is where bounces, blocks and spam reports live. SendGrid also keeps suppression lists and does not deliver mail to addresses on them, even though the platform recorded a successful handover. So when a buyer says the confirmation never arrived, there are two places to check.
The sending itself runs in the background, through a queue backed by Redis, so it does not hold up order processing. A test with a real inbox is still worth running before the first customer order.
The newsletter is a separate channel
The newsletter module has its own sending provider, set in the admin panel and independent of the transactional transport. SendGrid can serve that channel too. It is best to use a second API key for this, so that it can be revoked without stopping order confirmations.
Campaigns go out through a separate queue with a configurable messages-per-second limit, so a spike during a campaign does not delay transactional mail. If you run mailings in an external platform, the whole module can be switched off.
SendGrid or another provider
SendGrid fits when the company has no infrastructure in AWS and wants to get sending running quickly: an account, an authenticated domain, one key. Amazon SES is the more natural choice when the store already runs in AWS and email should be billed and supervised in the same place. Your own SMTP server is enough at low volume, as long as someone looks after the domain’s reputation. All three options are picked from the same provider list, so the choice is not a decision for years.