Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
G

greenmail

> 测试质量
Open source

Official master for the Greenmail project

740 stars0 likes1 views
WebsiteGitHub

About

Official master for the Greenmail project

GreenMail

GreenMail allows developers to test email-based applications, services or systems without access to a live mail server. Developers can send, receive, and verify emails by embedding GreenMail in a unit test or running it as a standalone container. GreenMail acts as a virtual (mocking/sandbox) mail server and supports common mail protocols SMTP, IMAP and POP3.

  • Examples
  • Javadoc
  • FAQ
  • Download
  • Maven coordinates: com.icegreen:greenmail:\

The separate GreenMail Client Integrations project provides a containerized example integration of GreenMail with various web mail clients.

The GreenMail project welcomes any contribution, so go ahead and fork/open a pull request! See the guidelines below.

Version compatibility

GreenMail Mail API Example frameworks
2.1.x JakartaMail 2.1.x Jakarta EE 10
2.0.x JakartaMail 2.0.x Jakarta EE 9, Spring 6,
1.6.x JakartaMail 1.6.x Jakarta EE 8, Spring 5, Apache commons-mail 1.6, ...

Development

  • Build GreenMail from source

    mvn clean install -Pdocker

    This project uses Maven Wrapper for consistent build using Maven 3.9.x or higher, and requires JDK 11 or newer for building.

    • Skip building the docker image by leaving out the -Pdocker profile option
    • Skip long-running integration tests using the Maven option -DskipITs
  • Build the Maven site (and the optional example report)

    mvn site -Psite

  • Build and deploy a release

    For rolling a release including version increment and release upload, do

    mvn clean release:prepare -Prelease,docker,docker-tag-latest mvn release:perform -Prelease,docker,docker-tag-latest

    For a tagged release and deployment to Sonatype OpenSource Repository Hosting and later syncing to Maven Central, do

    mvn clean deploy -Prelease,release-ossrh,docker,docker-tag-latest

    Note: Do only use docker-tag-latest profile if you really want the tag latest, e.g. for newest release of the highest version.

  • Build and deploy a snapshot

    For a Maven Snapshot deployment to Sonatype, do

    mvn clean deploy -Prelease-ossrh,docker

Roadmap

  • 2.1
    • Baseline: Jakarta EE 10
      • JakartaMail 2.1 / Angus Mail
      • Java 11
      • Jersey 3.1.x
    • Only junit 5?
  • 2.0 (branch master)
    • Baseline: Jakarta EE 9
      • JakartaMail 2.0
      • Jersey 3.0.x for servlet 5 / restfulWS-3.0
      • Java 11 for building / running integration tests
    • Java 8
    • Deprecations (no GreenMailRule in greenmail-core, ...)
  • 1.6 (branch releases/1.6.x)
    • Bugfix and maintenance

Contributing

We really appreciate your contribution!

Please check out the contributing guide.

Misc

Many thanks to JProfiler and Jetbrains for supporting this project with free OSS licenses

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Javagreenmailimapintegration-testingmock-server

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category测试质量
PricingOpen source

> Related tools

J
Jest
JavaScript 测试框架
P
Playwright
现代端到端测试框架
E
eslint-plugin-test-selectors
Enforces that data-test-id attributes are added to interactive DOM elements (JSX) to help with UI testing. JSX only.