Mailtrap
Connect Mailtrap to GoodPostal for campaign sending with built-in analytics, one-click webhook setup, and unsubscribe links that Mailtrap hosts for you on every plan.
Prerequisites
- A Mailtrap account with Email Sending enabled
- A verified sending domain under Sending Domains
- An API token
Setup Steps
- 1
Verify your sending domain
In Mailtrap, go to Sending Domains > Add Your Domain and add the DNS records Mailtrap shows you. Wait for the domain to show as verified before connecting it to GoodPostal. - 2
Create your API token
Go to Settings > API Tokens and create a token. The token needs permission to send email and to manage webhooks, so GoodPostal can set up delivery tracking for you. Copy the token. - 3
Add the provider in GoodPostal
Go to Configure > Email Providers, click "Add Provider", select Mailtrap, and paste your API token. - 4
Test the connection
GoodPostal automatically tests the token. If the test fails, check that the token is active and has sending permission. - 5
Set up webhooks with one click
On the Mailtrap provider page in GoodPostal, use the webhook setup button. GoodPostal registers its own webhook in your Mailtrap account and verifies every incoming event signature automatically.
API Token
API Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxThe Bulk stream
Mailtrap separates transactional sending from bulk sending. Campaigns are bulk email, so GoodPostal always sends through Mailtrap's Bulk stream. This happens automatically; there is nothing to configure. It matters for two reasons:
- Your Mailtrap plan's bulk sending quota is what limits campaign volume.
- Mailtrap adds a hosted unsubscribe link to bulk email, which keeps your campaigns compliant with one-click unsubscribe requirements on every plan, including the free one.
Unsubscribe handling
Mailtrap hosts the unsubscribe page itself, and GoodPostal places the unsubscribe link inside your email's own footer design, so subscribers see your branding, not a bolted-on footer. When someone unsubscribes, the webhook tells GoodPostal and the contact is marked unsubscribed in your workspace automatically.
Open and click tracking
- Opens are tracked by Mailtrap on all plans and flow into GoodPostal analytics through the webhook.
- Clicks require a paid Mailtrap plan. If you are on Mailtrap's free plan and want click tracking, connect your own tracking domain in Configure > Tracking Domain and GoodPostal will track clicks itself. This is optional; your campaigns send fine without it.
Signature Verification
Mailtrap signs every webhook request with an HMAC-SHA256 signature in the Mailtrap-Signature header. GoodPostal stores the signing secret when it registers the webhook and verifies the signature on every incoming event, so forged events are rejected.
Troubleshooting
- Connection test fails - Make sure you are using an API token from Settings > API Tokens, and that it has permission to send email.
- Sends fail with a domain error - Your sending domain must be verified in Mailtrap and your sender address must use that domain.
- Webhook events not arriving - Re-run the webhook setup from the provider page in GoodPostal. It replaces only the webhook GoodPostal created, never ones you added yourself.
- No click events - Click tracking is a paid Mailtrap feature. Either upgrade your Mailtrap plan or connect a GoodPostal tracking domain.
See also: Webhook Configuration Guide