{"id":19010319,"url":"https://github.com/mailtrap/mailtrap-elixir","last_synced_at":"2026-04-24T07:30:20.556Z","repository":{"id":65394238,"uuid":"591431363","full_name":"railsware/mailtrap-elixir","owner":"railsware","description":"The official mailtrap.io Elixir client","archived":false,"fork":false,"pushed_at":"2023-03-13T13:09:25.000Z","size":171,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":17,"default_branch":"main","last_synced_at":"2024-03-15T02:51:58.134Z","etag":null,"topics":["elixir","email","mail","mailtrap-io"],"latest_commit_sha":null,"homepage":"https://mailtrap.io","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/railsware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-20T18:36:45.000Z","updated_at":"2023-07-25T15:06:39.000Z","dependencies_parsed_at":"2024-11-08T19:11:17.228Z","dependency_job_id":"3daa8a16-d5c8-4113-9942-2d85ad0d9987","html_url":"https://github.com/railsware/mailtrap-elixir","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/railsware%2Fmailtrap-elixir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/railsware%2Fmailtrap-elixir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/railsware%2Fmailtrap-elixir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/railsware%2Fmailtrap-elixir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/railsware","download_url":"https://codeload.github.com/railsware/mailtrap-elixir/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240037838,"owners_count":19738028,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["elixir","email","mail","mailtrap-io"],"created_at":"2024-11-08T19:10:51.624Z","updated_at":"2026-04-24T07:30:20.489Z","avatar_url":"https://github.com/railsware.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mailtrap\n\n[![Elixir CI](https://github.com/kalys/elixir-mailtrap/actions/workflows/elixir.yml/badge.svg)](https://github.com/kalys/elixir-mailtrap/actions/workflows/elixir.yml)\n[![Module Version](https://img.shields.io/hexpm/v/mailtrap.svg)](https://hex.pm/packages/mailtrap)\n[![Hex Docs](https://img.shields.io/badge/hex-docs-lightgreen.svg)](https://hexdocs.pm/mailtrap/)\n[![Total Download](https://img.shields.io/hexpm/dt/mailtrap.svg)](https://hex.pm/packages/mailtrap)\n[![License](https://img.shields.io/hexpm/l/mailtrap.svg)](https://github.com/kalys/elixir-mailtrap/blob/master/LICENSE.md)\n[![Last Updated](https://img.shields.io/github/last-commit/kalys/elixir-mailtrap.svg)](https://github.com/kalys/elixir-mailtrap/commits/master)\n\nMailtrap API client\nBamboo adapters for Mailtrap Sandbox and Mailtrap Sending APIs\n\n## Installation\n\n```elixir\ndef deps do\n  [\n    {:mailtrap, \"~\u003e 0.1.0\"}\n  ]\nend\n```\n\n## Configuration\n\nFor Mailtrap Sandbox Bamboo adapter\n\n```elixir\nconfig :test_mailtrap, TestMailtrap.Mailer,\n  adapter: Bamboo.MailtrapSandboxAdapter,\n  api_token: \"PASTE TOKEN HERE\",\n  inbox_id: 111 # replace with your inbox id\n```\n\nFor Mailtrap Sending Bamboo adapter\n\n```elixir\nconfig :test_mailtrap, TestMailtrap.Mailer,\n  adapter: Bamboo.MailtrapSendingAdapter,\n  api_token: \"PASTE TOKEN HERE\"\n```\n\n## Usage\n\nMailtrap API\n\n```elixir\n  client = Mailtrap.client(\"PASTE TOKEN HERE\")\n  accounts = Mailtrap.get(client, \"accounts\")\n  # or\n  Mailtrap.delete(client, \"accounts/\" \u003c\u003e account_id \u003c\u003e \"/account_accesses/\" \u003c\u003e account_access_id)\n```\n\nSending to Mailtrap Sandbox API\n\n```elixir\nclient = Mailtrap.Sandbox.client(\"PASTE TOKEN HERE\")\nemail = (%Mailtrap.Email{}\n  |\u003e Mailtrap.Email.put_from({\"From name\", \"from@example.com\"})\n  |\u003e Mailtrap.Email.put_to({\"Recepient\", \"recepient@example.com\"})\n  |\u003e Mailtrap.Email.put_subject(\"Hi there\")\n  |\u003e Mailtrap.Email.put_text(\"General Kenobi\"))\nMailtrap.Sandbox.send(client, email, 111) # replace 111 with your inbox id\n```\n\nSending via Mailtrap Sending API\n\n```elixir\nclient = Mailtrap.Sending.client(\"PASTE TOKEN HERE\")\nemail = (%Mailtrap.Email{}\n  |\u003e Mailtrap.Email.put_from({\"From name\", \"from@example.com\"})\n  |\u003e Mailtrap.Email.put_to({\"Recepient\", \"recepient@example.com\"})\n  |\u003e Mailtrap.Email.put_subject(\"Hi there\")\n  |\u003e Mailtrap.Email.put_text(\"General Kenobi\"))\nMailtrap.Sending.send(client, email)\n```\n\n### Bamboo adapter\n\n```elixir\n# mailer module\ndefmodule TestMailtrap.Mailer do\n  use Bamboo.Mailer, otp_app: :test_mailtrap\nend\n\n# generate email\ndef welcome_email(subject \\\\ \"Hi there\", friendly_name \\\\ \"Recepient\", to \\\\ \"recepient@example.com\") do\n  new_email(\n    to: {friendly_name, to},\n    from: {\"From\", \"from@example.com\"},\n    subject: subject,\n    html_body: \"\u003cstrong\u003eThanks for joining!\u003c/strong\u003e\",\n    text_body: \"Thanks for joining!\"\n  )\nend\n\n# send\nwelcome_email() |\u003e TestMailtrap.Mailer.deliver_now()\n```\n\nDocumentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)\nand published on [HexDocs](https://hexdocs.pm). Once published, the docs can\nbe found at \u003chttps://hexdocs.pm/mailtrap\u003e.\n\n## Copyright and License\n\nCopyright (c) 2023 Railsware Products Studio LLC\n\nThis library is released under the MIT License. See the [LICENSE.md](./LICENSE.md) file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmailtrap%2Fmailtrap-elixir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmailtrap%2Fmailtrap-elixir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmailtrap%2Fmailtrap-elixir/lists"}