{"id":19398344,"url":"https://github.com/quarkiverse/quarkus-mailpit","last_synced_at":"2025-04-24T05:31:37.315Z","repository":{"id":200026120,"uuid":"704649775","full_name":"quarkiverse/quarkus-mailpit","owner":"quarkiverse","description":"Email and SMTP testing tool with API for developers","archived":false,"fork":false,"pushed_at":"2025-04-10T17:07:48.000Z","size":802,"stargazers_count":19,"open_issues_count":1,"forks_count":9,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-10T18:49:10.123Z","etag":null,"topics":["email","quarkus-extension","smtp-server"],"latest_commit_sha":null,"homepage":"https://github.com/axllent/mailpit","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/quarkiverse.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-10-13T18:20:34.000Z","updated_at":"2025-04-10T17:07:50.000Z","dependencies_parsed_at":"2023-11-13T19:31:01.653Z","dependency_job_id":"a416e4e4-c267-4d08-af00-a8f820808053","html_url":"https://github.com/quarkiverse/quarkus-mailpit","commit_stats":null,"previous_names":["quarkiverse/quarkus-mailpit"],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quarkiverse%2Fquarkus-mailpit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quarkiverse%2Fquarkus-mailpit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quarkiverse%2Fquarkus-mailpit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quarkiverse%2Fquarkus-mailpit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/quarkiverse","download_url":"https://codeload.github.com/quarkiverse/quarkus-mailpit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250572397,"owners_count":21452329,"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":["email","quarkus-extension","smtp-server"],"created_at":"2024-11-10T11:05:39.972Z","updated_at":"2025-04-24T05:31:37.308Z","avatar_url":"https://github.com/quarkiverse.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\u003cimg src=\"https://github.com/quarkiverse/quarkus-mailpit/blob/main/docs/modules/ROOT/assets/images/quarkus.svg\" width=\"67\" height=\"70\" \u003e\u003cimg src=\"https://github.com/quarkiverse/quarkus-mailpit/blob/main/docs/modules/ROOT/assets/images/plus-sign.svg\" height=\"70\" \u003e\u003cimg src=\"https://github.com/quarkiverse/quarkus-mailpit/blob/main/docs/modules/ROOT/assets/images/mailpit.svg\" height=\"70\" \u003e\n\n# Quarkus Mailpit\n\u003c/div\u003e\n\u003cbr\u003e\n\n[![Version](https://img.shields.io/maven-central/v/io.quarkiverse.mailpit/quarkus-mailpit?logo=apache-maven\u0026style=flat-square)](https://search.maven.org/artifact/io.quarkiverse.mailpit/quarkus-mailpit)\n[![License](https://img.shields.io/badge/License-Apache%202.0-yellow.svg?style=flat-square)](https://opensource.org/licenses/Apache-2.0)\n[![Build](https://github.com/quarkiverse/quarkus-mailpit/actions/workflows/build.yml/badge.svg)](https://github.com/quarkiverse/quarkus-mailpit/actions/workflows/build.yml)\n\nA Quarkus extension that lets you utilize [Mailpit](https://github.com/axllent/mailpit) as a [DevService](https://quarkus.io/guides/dev-services) for the Quarkus Mailer enabling zero-config SMTP for testing or running in dev mode.  Mailpit acts as an SMTP server, provides a modern web interface to view \u0026 test captured emails, and contains an API for automated integration testing.\n\nUsing this service has some obvious advantages when running in dev mode including but not limited to:\n\n* Verify e-mail and their content without a real mail server\n* Prevent accidentally sending a customer an email while developing\n* Use the REST API to verify contents of real send emails and not mocked mail\n* [12 Factor App: Backing services](https://12factor.net/backing-services) Treat backing services as attached resources\n* [12 Factor App: Dev/Prod Parity](https://12factor.net/dev-prod-parity) Keep development and production as similar as possible \n\n## Getting started\n\nRead the full [Mailpit documentation](https://docs.quarkiverse.io/quarkus-mailpit/dev/index.html).\n\n### Prerequisite\n\n- Create or use an existing Quarkus application which uses Mailer\n- Add the Mailpit extension\n\n### Installation\n\nCreate a new mailpit project (with a base mailpit starter code):\n\n- With [code.quarkus.io](https://code.quarkus.io/?a=mailpit-bowl\u0026j=17\u0026e=io.quarkiverse.mailpit%3Aquarkus-mailpit)\n- With the [Quarkus CLI](https://quarkus.io/guides/cli-tooling):\n\n```bash\nquarkus create app mailpit-app -x=io.quarkiverse.mailpit:quarkus-mailpit\n```\nOr add to you pom.xml directly:\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eio.quarkiverse.mailpit\u003c/groupId\u003e\n    \u003cartifactId\u003equarkus-mailpit\u003c/artifactId\u003e\n    \u003cversion\u003e{project-version}\u003c/version\u003e\n\u003c/dependency\u003e\n\n\u003c!-- If you want to use test framework to verify emails also --\u003e\n\u003cdependency\u003e\n   \u003cgroupId\u003eio.quarkiverse.mailpit\u003c/groupId\u003e\n   \u003cartifactId\u003equarkus-mailpit-testing\u003c/artifactId\u003e\n   \u003cversion\u003e{project-version}\u003c/version\u003e\n   \u003cscope\u003etest\u003c/scope\u003e\n\u003c/dependency\u003e\n```\n\n## Usage\n\nMailpit configure automatically all mailer configuration (even `MailerName`).\n\n```java\n@Path(\"/superheroes\")\n@ApplicationScoped\npublic class SuperheroResource {\n    @Inject\n    Mailer mailer;\n\n    @GET\n    public String villainAlert() {\n        Mail m = new Mail();\n        m.setFrom(\"admin@hallofjustice.net\");\n        m.setTo(List.of(\"superheroes@quarkus.io\"));\n        m.setSubject(\"WARNING: Super Villain Alert\");\n        m.setText(\"Lex Luthor has been seen in Gotham City!\");\n        mailer.send(m);\n\n        return \"Superheroes alerted!\";\n    }\n}\n```\n\nThen inspect your e-mails from your running application in the Dev UI:\n\n![Mailpit UI](./docs/modules/ROOT/assets/images/mailpit-ui.png)\n\n## Logging\n\nYou can view all of Mailpit's container logs right in the DevUI log area to debug all messages and errors from Mailpit.\n\n![Mailpit Logs](./docs/modules/ROOT/assets/images/mailpit-logs.png)\n\n## Testing\n\nRunning your integration tests you can inspect the results of any mail capture by Mailpit using our test framework.  For example to test the example email above the test would look like this:\n\n```java\n@QuarkusTest\n@WithMailbox\npublic class MailpitResourceTest {\n\n    @InjectMailbox\n    Mailbox mailbox;\n\n    @AfterEach\n    public void afterEach() throws ApiException {\n        // clear the mailbox after each test run if you prefer\n        mailbox.clear();\n    }\n\n    @Test\n    public void testAlert() throws ApiException {\n        given()\n                .when().get(\"/mailpit/alert\")\n                .then()\n                .statusCode(200)\n                .body(is(\"Superheroes alerted!!\"));\n\n        // look up the mail and assert it\n        Message message = mailbox.findFirst(\"admin@hallofjustice.net\");\n        assertThat(message, notNullValue());\n        assertThat(message.getTo().get(0).getAddress(), is(\"superheroes@quarkus.io\"));\n        assertThat(message.getSubject(), is(\"WARNING: Super Villain Alert\"));\n        assertThat(message.getText(), is(\"Lex Luthor has been seen in Gotham City!\\r\\n\"));\n    }\n}\n```\n\n## 🧑‍💻 Contributing\n\n- Contribution is the best way to support and get involved in community!\n- Please, consult our [Code of Conduct](./CODE_OF_CONDUCT.md) policies for interacting in our community.\n- Contributions to `quarkus-mailpit` Please check our [CONTRIBUTING.md](./CONTRIBUTING.md)\n\n### If you have any idea or question 🤷\n\n- [Ask a question](https://github.com/quarkiverse/quarkus-mailpit/discussions)\n- [Raise an issue](https://github.com/quarkiverse/quarkus-mailpit/issues)\n- [Feature request](https://github.com/quarkiverse/quarkus-mailpit/issues)\n- [Code submission](https://github.com/quarkiverse/quarkus-mailpit/pulls)\n\n## Contributors ✨\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"http://melloware.com\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/4399574?v=4?s=100\" width=\"100px;\" alt=\"Melloware\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eMelloware\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/quarkiverse/quarkus-mailpit/commits?author=melloware\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"#maintenance-melloware\" title=\"Maintenance\"\u003e🚧\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/tmulle\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/5183186?v=4?s=100\" width=\"100px;\" alt=\"tmulle\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003etmulle\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/quarkiverse/quarkus-mailpit/commits?author=tmulle\" title=\"Tests\"\u003e⚠️\u003c/a\u003e \u003ca href=\"https://github.com/quarkiverse/quarkus-mailpit/issues?q=author%3Atmulle\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/wansors\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/15862396?v=4?s=100\" width=\"100px;\" alt=\"wansors\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003ewansors\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/quarkiverse/quarkus-mailpit/issues?q=author%3Awansors\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"http://gastaldi.wordpress.com\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/54133?v=4?s=100\" width=\"100px;\" alt=\"George Gastaldi\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eGeorge Gastaldi\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/quarkiverse/quarkus-mailpit/issues?q=author%3Agastaldi\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e \u003ca href=\"https://github.com/quarkiverse/quarkus-mailpit/commits?author=gastaldi\" title=\"Tests\"\u003e⚠️\u003c/a\u003e \u003ca href=\"https://github.com/quarkiverse/quarkus-mailpit/commits?author=gastaldi\" title=\"Documentation\"\u003e📖\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/erickloss\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/16836464?v=4?s=100\" width=\"100px;\" alt=\"Eric Kloss\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eEric Kloss\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/quarkiverse/quarkus-mailpit/issues?q=author%3Aerickloss\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/ggrebert\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/1737774?v=4?s=100\" width=\"100px;\" alt=\"Geoffrey GREBERT\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eGeoffrey GREBERT\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/quarkiverse/quarkus-mailpit/commits?author=ggrebert\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"#design-ggrebert\" title=\"Design\"\u003e🎨\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://www.georg-leber.de\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/1669956?v=4?s=100\" width=\"100px;\" alt=\"Georg Leber\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eGeorg Leber\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/quarkiverse/quarkus-mailpit/commits?author=georgleber\" title=\"Documentation\"\u003e📖\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://xam.dk\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/54129?v=4?s=100\" width=\"100px;\" alt=\"Max Rydahl Andersen\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eMax Rydahl Andersen\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/quarkiverse/quarkus-mailpit/issues?q=author%3Amaxandersen\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"http://www.phillip-kruger.com\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/6836179?v=4?s=100\" width=\"100px;\" alt=\"Phillip Krüger\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003ePhillip Krüger\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/quarkiverse/quarkus-mailpit/commits?author=phillip-kruger\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/horst-laubenthal\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/70582127?v=4?s=100\" width=\"100px;\" alt=\"horst-laubenthal\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003ehorst-laubenthal\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#ideas-horst-laubenthal\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://developers.redhat.com/author/eric-deandrea\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/363447?v=4?s=100\" width=\"100px;\" alt=\"Eric Deandrea\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eEric Deandrea\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#ideas-edeandrea\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e \u003ca href=\"https://github.com/quarkiverse/quarkus-mailpit/commits?author=edeandrea\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/geoand\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/4374975?v=4?s=100\" width=\"100px;\" alt=\"Georgios Andrianakis\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eGeorgios Andrianakis\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/quarkiverse/quarkus-mailpit/commits?author=geoand\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/carolosf\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/2076671?v=4?s=100\" width=\"100px;\" alt=\"carolosf\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003ecarolosf\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/quarkiverse/quarkus-mailpit/commits?author=carolosf\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://www.axllent.org/\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/1463435?v=4?s=100\" width=\"100px;\" alt=\"Ralph Slooten\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eRalph Slooten\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/quarkiverse/quarkus-mailpit/commits?author=axllent\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/dcdh\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/5189615?v=4?s=100\" width=\"100px;\" alt=\"Damien Clément d'Huart\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eDamien Clément d'Huart\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/quarkiverse/quarkus-mailpit/issues?q=author%3Adcdh\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/yoavgeva\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/6544847?v=4?s=100\" width=\"100px;\" alt=\"Yoav Geva\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eYoav Geva\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#ideas-yoavgeva\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquarkiverse%2Fquarkus-mailpit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquarkiverse%2Fquarkus-mailpit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquarkiverse%2Fquarkus-mailpit/lists"}