You can use the Mailtrap provider to send transactional emails to your customers using the Novu Platform with a single API to create multi-channel experiences.
Novu’s Mailtrap provider targets Mailtrap’s Email Sending (production transactional) API - not the Email Testing sandbox (sandbox.api.mailtrap.io). The integration form accepts an API token and a verified From address, and does not expose a sandbox host or inbox ID. To preview outgoing messages without delivering to real recipients, use Novu’s Development environment or capture mail with a provider whose sandbox exposes standard SMTP (for example, the Custom SMTP provider pointed at your test SMTP host).
Getting Started#
To use the Mailtrap provider in the email channel, you will need to create a Mailtrap account and add your API key to the Mailtrap integration on the Novu platform.
Generating an API Key#
To generate a new API key in Mailtrap, you can follow these steps:
- Sign Up or Log in to your Mailtrap account.
- Click on the Email Sending link on the sidebar, and then click the “Sending Domains” link that pops up from the available options.
- On the Sending Domains page, type your domain name and confirm with the
Add Your Domainbutton. Then, proceed to copy DNS records Mailtrap provides to your domain’s DNS. - Go to API Keys page and copy token with
Domain Adminaccess level for your registered domain.
Authenticating your Sender Identity#
Before you can send emails, you will need to verify your sending domain ownership. Mailtrap rejects sending emails from unverified domains to prevent spam and email fraud.
Creating a Mailtrap integration with Novu#
- Visit the Integrations store on the Novu web dashboard.
- Click on Add a Provider.
- Select Mailtrap service.
- Enter your Mailtrap API Key.
- Fill in the
From email addressfield using the authenticated email from the previous step. - Click on the
Disabledbutton and mark it asActive. - Click on the Update button.
- You should now be able to send notifications through Mailtrap using Novu.
Next Steps#
Learn how to configure bcc, cc, and reply-to for your email notifications using email overrides
Learn how to send attachments with email notifications
Learn how to use different email provider integrations to be used to send emails