Migrate from SendGrid or another SMTP provider¶
If your application sends over SMTP, migrating to FrontEngine is a configuration change: host, port, username and password. This guide uses SendGrid as the example, but it applies to any SMTP relay provider.
The SendGrid HTTP API is not supported
FrontEngine does not accept the request format of the SendGrid API (POST /v3/mail/send), nor the official SendGrid libraries pointed at another address. If you send through their HTTP API, there are two paths: start sending over SMTP, or adapt the call to the FrontEngine API. See Examples by language.
What changes in the configuration¶
| Item | SendGrid | FrontEngine |
|---|---|---|
| Host | smtp.sendgrid.net | smtp-out.frontengine.net |
| Port | 587 or 465 | 587 (STARTTLS) or 465 (implicit TLS) |
| Username | the fixed text apikey | any text. The username is not checked |
| Password | the SendGrid API key | the server key on FrontEngine |
| Authentication | PLAIN or LOGIN | AUTH PLAIN or AUTH LOGIN |
| TLS | available | required, 1.2 or later |
For other providers, the table is the same: only the left column changes.
Because the username is not checked, you can keep the value already configured (for example apikey) and change only the host and the password.
Configuration examples for Laravel, Django, Rails, Spring Boot, WordPress, Postfix and Exchange are in Examples by framework and server.
Limits to check¶
| Limit | FrontEngine |
|---|---|
| Message size | 50 MB |
| Recipients per SMTP message | 100 |
| Authentication mechanisms | PLAIN and LOGIN. CRAM-MD5 is not accepted |
| Ports | 587 and 465. Port 25 is not used for authenticated sending |
If your application puts many recipients in the same message, split it into messages with up to 100 recipients. For transactional email, the norm is one message per recipient.
SendGrid-specific features¶
Some SendGrid features are triggered by headers or fields of its own. FrontEngine does not interpret them.
| Feature on SendGrid | On FrontEngine |
|---|---|
X-SMTPAPI header (categories, arguments, scheduling, filters) | Not interpreted. Remove the header, so that its content does not travel in the message delivered to the recipient |
| Categories | Use the X-Postal-Tag header, with one tag per message |
Custom arguments (unique_args, custom_args) | There is no per-message metadata. Keep in your system the relation between your data and the message's Message-ID |
| Dynamic templates and substitutions | There are no templates. Build the final content in your application |
Scheduled sending (send_at) | None. Schedule in your application |
| Unsubscribe groups | None. See the Anti-Spam Policy on notifications the recipient can do without |
| Open and click tracking | Available, with a tracking domain of your own. See Tracking. To turn it off for a message, use X-AMP: skip |
| Event Webhook | FrontEngine webhooks have other event names, another format and another signature. The receiver has to be adapted |
| Suppression lists by API | There is no customer API. See Recipient suppression |
| Dedicated IP | An add-on assigned by our team. See IP pools and dedicated IP |
Events¶
| Event on SendGrid | Event on FrontEngine |
|---|---|
delivered | MessageSent |
deferred | MessageDelayed |
bounce | MessageDeliveryFailed or MessageBounced |
dropped | MessageHeld, when the recipient is on the suppression list |
open | MessageLoaded |
click | MessageLinkClicked |
spamreport | there is no complaint event |
processed | the SMTP 250 reply |
On FrontEngine each event arrives in a request of its own, not in a batch. Verification uses an RSA signature with the key published at https://api.frontengine.net/.well-known/jwks.json. See Webhooks and Security.
DNS¶
| Record | What to do |
|---|---|
| Verification TXT | Add FrontEngine's |
| DKIM | Add the FrontEngine key. The current provider's records stay until the migration ends |
| SPF | Add the FrontEngine include to the existing SPF record. Keep a single v=spf1 record |
| Return path | Publish the CNAME frp.<domain> pointing at rp.frontengine.net |
| DMARC | No change. If it does not exist, publish it |
The values are in Set up a sending domain. After the cutover, remove the previous provider's records, including the domain authentication and link branding CNAME records.
Step by step¶
- Ask for activation and receive the server key and the DNS records.
- Publish the records and wait for the domain to be verified.
- Test in staging: change host and password and send to mailboxes of your own at the main providers. Check in the received headers that SPF, DKIM and DMARC passed.
- Remove what is specific to the previous provider: the
X-SMTPAPIheader, templates, scheduling. - Adapt the event receiver, if you use webhooks.
- Move traffic gradually. Start with one message type and increase over days. The sending IP addresses change, and providers notice the change. See Deliverability practices.
- Keep the previous account active for a few days after the cutover, in case you need to go back.
- Clean up: remove the old DNS records and revoke the previous provider's keys.
A quick connection and authentication test:
swaks --server smtp-out.frontengine.net --port 587 --tls \
--auth LOGIN --auth-user frontengine --auth-password "$FRONTENGINE_KEY" \
--from [email protected] --to [email protected] \
--header "Subject: Migration test" --body "Test."