An Elixir client library for sending emails via the Mailgun API with a clean, declarative interface.
Mailgun is an Elixir client library that provides a clean interface for sending emails through the Mailgun email service API. It allows developers to integrate email functionality into their Elixir applications with minimal boilerplate code, handling API communication, attachments, and testing configurations automatically.
Elixir developers building applications that need reliable email delivery functionality, particularly those already using or considering the Mailgun email service.
Developers choose this library for its declarative, Elixir-idiomatic API that reduces integration complexity while providing essential features like attachment handling and a built-in test mode that prevents accidental email sends during development.
Elixir Mailgun Client
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
The library offers a clean, function-based interface for sending emails, as shown in the README with examples like `send_email to: user.email, from: @from, subject: 'hello!'`, reducing boilerplate code.
It includes a test mode that redirects emails to a local JSON file, preventing accidental API calls during testing, configured via `mode: :test` and `test_file_path`.
Supports attachments via both file paths and raw content strings, demonstrated with `%{path: file_path}` for files and `%{content: pdf}` for in-memory data.
Allows fine-grained HTTP configuration through `httpc_opts`, enabling settings like timeouts, as seen in the example with `connect_timeout: 2000`.
Relies on Erlang's httpc, which may lack features like automatic retries or advanced pooling compared to modern Elixir HTTP clients, and is explicitly mentioned as the underlying mechanism.
Test mode only outputs to a JSON file, which doesn't integrate with Elixir's testing frameworks for in-memory assertions or real-time inspection, limiting testing flexibility.
With version 0.1.2, the library is in early stages, potentially leading to breaking changes or missing features, as indicated by the low version number and minimal documentation.