feat: mailtrap driver#98
Merged
productdevbook merged 11 commits intoJun 19, 2026
Merged
Conversation
Add unemail/driver/mailtrap for Mailtrap transactional send and batch APIs. Includes tests, package exports, and drivers.md matrix row.
Include a new section in the README detailing how to use the Mailtrap driver for sending emails, with a code snippet demonstrating the setup and usage in both production and sandbox environments.
Include detailed information on the Mailtrap driver, covering its usage in both production and sandbox environments. Added code examples demonstrating how to configure and send emails using the Mailtrap API.
Add options for sandbox mode in Mailtrap driver, including `sandbox`, `inboxId`, and `sandboxEndpoint`. Implement logic to handle sandbox-specific API calls and validate inbox ID requirements for sandbox usage. Update documentation comments for clarity on new options.
…ionality Introduce multiple test cases for the Mailtrap driver to validate sandbox mode behavior, including routing, default settings, error handling for missing inbox IDs, and batch sending. Ensure that the implementation adheres to expected API interactions and error responses.
Implement a new test case to verify that the Mailtrap driver correctly switches the API host in sandbox mode without altering the payload flag. This ensures proper handling of API interactions and maintains expected behavior for metadata inclusion.
…usage Revise README.md and drivers.md to reflect the updated terminology for Mailtrap, changing references from "production" to "Email API" and enhancing clarity on routing distinctions between Email API and sandbox environments.
…I and sandbox usage
… types Refine the test description and error message assertions in the sendBatch test to specify "Email Sandbox" and "Email API" instead of generic terms, enhancing clarity on the expected behavior when handling mixed message types.
Owner
|
Thank you, it looks great. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
unemail/driver/mailtrap— one driver for Mailtrap Email API and Email Sandbox, same API token, switched viamsg.sandbox+inboxId.send.api.mailtrap.io(/api/send,/api/batch)sandbox.api.mailtrap.io(/api/send/{inboxId},/api/batch/{inboxId})docs/drivers.mdsubsection + README snippetCloses #96