Skip to content

Add Mailtrap email provider - #54

Merged
eelcoj merged 1 commit into
Rails-Designer:mainfrom
pcbeingused333:add-mailtrap-provider
Aug 31, 2026
Merged

eelcoj merged 1 commit into
Rails-Designer:mainfrom
pcbeingused333:add-mailtrap-provider

Conversation

@pcbeingused333

Copy link
Copy Markdown
Contributor

Adds Mailtrap as a transactional email provider.

Posts to https://send.api.mailtrap.io/api/send — the sending host, not the sandbox one. Authentication uses Mailtrap's own Api-Token header rather than Authorization: Bearer.

The body shape matches MailerSend's: from and reply_to as address objects, to/cc/bcc as arrays of them, and subject/text/html as strings.

  • lib/courrier/email/providers/mailtrap.rb — the provider
  • lib/courrier/email/provider.rb — require + registry entry
  • README.md — added to the supported providers list
  • test/courrier/email/providers/mailtrap_test.rb — body formatting, auth header, registry lookup, and that optional fields are dropped rather than sent as null

Full suite passes locally: 104 runs, 197 assertions, 0 failures, 0 errors, 0 skips.

Part of #35 — ticks the Mailtrap box.

Note: verified against Mailtrap's API documentation, not against a live account, so the payload shape is unconfirmed on their side.

@eelcoj
eelcoj force-pushed the add-mailtrap-provider branch from e011c66 to cd62a9f Compare August 31, 2026 11:16
@eelcoj
eelcoj merged commit 4b837cb into Rails-Designer:main Aug 31, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants