Integrate MailAdx with SendGrid for newsletter ad monetization
MailAdx works with SendGrid's dynamic templates and substitution tags. Add open-time ads to your SendGrid newsletters using the per-subscriber email hash in the template.
Why add MailAdx to SendGrid?
How to integrate MailAdx with SendGrid
- 1
Create your MailAdx publisher account
Sign up for a free MailAdx publisher account and create your first ad placement.
- 2
Set up SHA-256 email hash in SendGrid
SendGrid dynamic templates support substitution variables. Pre-compute the SHA-256 hash of each subscriber's email and pass it as a template variable in your send API call (e.g., {{email_sha256}}).
- 3
Add the MailAdx ad tag to your template
In SendGrid's email designer, add an HTML block and paste the MailAdx ad tag, using {{email_sha256}} as the hash parameter.
- 4
Test via SendGrid's preview or a test send
Use SendGrid's test send feature to verify the substitution works correctly and the ad loads on open.
SendGrid editor tips
For Marketing Campaigns, use the Code module in the design editor. For dynamic templates via API, pass email_sha256 in your personalizations[] payload. Test with SendGrid's sandbox mode before switching to production sends.
<!-- MailAdx ad tag — decision runs at open time -->
<a href="https://mailadx.com/api/v1/serving/click?pub=YOUR_PUB&pk=header&eh={{EMAIL_SHA256}}"
target="_blank">
<img src="https://mailadx.com/api/v1/serving/display?pub=YOUR_PUB&pk=header&eh={{EMAIL_SHA256}}&w=600&h=100"
width="600" height="100" alt="" />
</a>
<!-- Replace {{EMAIL_SHA256}} with your ESP's email hash merge tag -->SendGrid + MailAdx: common questions
Can MailAdx work with SendGrid Marketing Campaigns?
Yes. MailAdx works with both SendGrid's Marketing Campaigns (drag-and-drop editor with custom code blocks) and the transactional email API with dynamic templates.
How does billing work when I send through SendGrid?
You pay SendGrid for email delivery as usual. MailAdx charges only when a subscriber opens and the ad image is requested — not when SendGrid sends the email. A 10,000-recipient send with a 35% open rate generates roughly 3,500 billable impressions, not 10,000.
Can I use multiple ad placements in one SendGrid template?
Yes. Create separate ad units in MailAdx (e.g., header, mid-roll, footer) and paste each tag in a different HTML block. Each placement has its own floor CPM and reporting in the Publisher Portal.
Does the SendGrid integration work on mobile email clients?
Yes. MailAdx serves standard HTML image tags that render in Gmail iOS/Android, Apple Mail, Yahoo, and Outlook mobile. No JavaScript runs inside the inbox — the ad is a plain image request at open time.
Billing with SendGrid
MailAdx bills publishers a flat platform fee per impression served — typically $0.30–$0.50 CPM — regardless of which ESP you use. Your SendGrid subscription fee is separate; MailAdx does not charge per send or per subscriber. Advertisers pay you directly (or via programmatic demand) above the platform fee. Top up credits in the Publisher Portal before going live; impressions pause gracefully when credits reach zero.
Troubleshooting SendGrid + MailAdx
Ad image shows as broken or blank
Confirm the email-hash merge field substitutes in a real SendGrid test send — not just the editor preview. An empty hash causes MailAdx to skip the auction. Re-send a test to yourself, view the raw HTML source, and verify the eh= parameter is populated.
Impressions not appearing in Publisher Portal
Open the test email in a client that loads remote images (Gmail web, Apple Mail with images enabled). Some corporate Outlook configs block external images by default. Wait 60 seconds and refresh the portal — reporting is near-real-time.
Merge field syntax error in template
Each ESP uses different personalization syntax. Double-check you replaced {{EMAIL_SHA256}} in the MailAdx tag with SendGrid's exact variable from the setup steps above. A typo in the merge tag will break the URL at open time.
Related resources
Ready to monetize your SendGrid newsletter?
Free to start. No revenue share. Direct advertiser relationships from day one.