Elixir
Overview
Mailtrap can be integrated with Elixir apps and projects for email sending.
Email API/SMTP for Elixir
SDK integration
The Mailtrap Elixir SDK brings functional programming elegance to email sending with full support for Elixir's concurrent and fault-tolerant features. The SDK supports:
Transactional email sending
Sandbox testing
Account management
OTP-compliant design
Pattern matching for responses
Pipe-friendly API
Installation
Add the SDK to your mix.exs dependencies:
Then run:
Minimal Example
Here's a minimal example to send your first email:
SMTP integration
To integrate SMTP with your Elixir app, navigate to the Integrations tab and copy-paste the credentials.

Read more about SMTP integration here.
RESTful API integration
To integrate Mailtrap using RESTful API, simply copy/paste the API endpoint and API Token into the configuration file of the Elixir framework or library that supports HTTP requests. For more details, refer to the API documentation.

Read more about API integration in the here.
Last updated
Was this helpful?

