Migration · SendGrid
Move off SendGrid without rewriting your mailer.
A practical SendGrid to Transmitly migration: swap SMTP settings, map the API and webhook events, then run both providers before you cut over.
There are two migration paths from SendGrid. If the application already sends over SMTP, change the host, username and password. If it uses the v3 Mail Send API, map the request and webhook events. Start with a controlled flow, keep SendGrid configured during the comparison, and cut over when acceptance, deferrals and bounces line up.
Fastest path: SMTP
SendGrid's SMTP interface and Transmitly's authenticated submission use the same shape: host, port, username, password and STARTTLS. The username stays apikey on both sides; the password changes from the SendGrid API key to a Transmitly key with the send scope.
- Port 587 uses STARTTLS; port 465 uses implicit TLS.
- The From header and MAIL FROM must use the same verified domain.
- Standard MIME, inline CID images and attachments work without a mailer change.
- A test-only key forces test mode for staging.
# before
SMTP_HOST=smtp.sendgrid.net
SMTP_PORT=587
SMTP_USER=apikey
SMTP_PASSWORD=SG....
# after
SMTP_HOST=mail.transmitly.io
SMTP_PORT=587
SMTP_USER=apikey
SMTP_PASSWORD=txk_...If you use the v3 API
The API migration is a field mapping, not a protocol rewrite. A single-recipient SendGrid personalization maps to one Transmitly message. Keep the same template content and move delivery logic to the returned message ID.
- personalizations[].to maps to to. The per-message cap is 50 recipients, or the plan cap.
- from, subject and content[].value map to from, subject and html or text.
- categories map to tags. Keep non-delivery metadata in your own store or map it to tags where it fits.
- dynamic_template_data is not a drop-in Handlebars replacement. Transmitly templates use {{variable}} substitution; convert loops and conditionals before moving the template.
- SendGrid's custom_args have no direct field. Use tags for queryable delivery metadata and keep the rest in your application.
POST /v1/emails
{
"from": "Acme <[email protected]>",
"to": ["[email protected]"],
"subject": "Your receipt",
"html": "<p>Thanks for the payment.</p>",
"stream": "transactional",
"tags": { "flow": "receipt" }
}Webhook mapping
SendGrid posts an array of events to one Event Webhook. Transmitly emits signed events per state change. The names differ, but the delivery sequence maps cleanly.
- processed → email.accepted
- delivered → email.delivered_to_mx
- deferred → email.deferred
- bounce → email.bounced
- dropped → email.suppressed
- spamreport → email.complained
- open → email.opened
- click → email.clicked
- unsubscribe is a preference change, not a delivery event; handle it in your subscription flow.
Domain authentication and dual-run
Keep SendGrid active while the Transmitly domain verifies. Publish the ownership TXT plus SPF, DKIM and DMARC records shown in the dashboard. A subdomain is the cleanest way to keep the old and new authentication records separate during the comparison.
Send a small production flow through both providers to a controlled address. Compare acceptance, delivered-to-MX, deferrals, hard bounces and complaint events. Do not judge inbox placement from this test; it measures the handoff and the event model, not the recipient's inbox.
- Verify the domain before sending production traffic.
- Use a test-only key for staging and the synthetic @transmitly.test addresses.
- Confirm the webhook signature with the new signing secret before enabling consumers.
- Keep the SendGrid environment variables until the dual-run window closes.
- Roll back by restoring the old host and key; no application data migration is involved.
What you gain
The point of the move is not a different SMTP greeting. It is a delivery model that keeps accepted, delivered-to-MX, deferred, bounced and complained states separate, records per-recipient outcomes, and lets you replay a webhook without guessing which event was lost.
If you need idempotent retries or structured batch sends, move the high-value flows to the API after the SMTP cutover. The API accepts an Idempotency-Key and returns a message ID with per-recipient state.
Questions
Common questions
+Can I keep SendGrid running during the migration?
Yes. Keep the old credentials configured, send a controlled flow through both providers, and compare acceptance, delivered-to-MX, deferrals and bounces before moving volume.
+Do SendGrid templates migrate automatically?
No. HTML and text templates move as content. SendGrid dynamic templates use Handlebars loops and conditionals; Transmitly templates use {{variable}} substitution, so convert those constructs before moving the template.
+Do I need to change DNS?
Yes. Verify the sending domain in Transmitly and publish SPF, DKIM and DMARC. A subdomain keeps the old and new authentication records separate during a dual-run.
+Are the webhook signatures the same?
No. SendGrid's Event Webhook signature scheme is different from Transmitly's. Verify the new signing secret before enabling production consumers, and keep the old endpoint active until the cutover is complete.
+Is there a SendGrid-compatible SDK adapter?
Not currently. The supported paths are authenticated SMTP submission and the Transmitly API. Use the field mapping above rather than assuming a drop-in SDK replacement.
Related
See what the remote MX actually said.
Start free, verify a domain and send a test. Acceptance and delivery evidence stay separate.