https://github.com/m-szalik/javamail/wiki
Allows sending emails form your application using java.mail.Session to a file that is helpful during development phase.
Allows also sending emails using java.mail.Session to JMS queue and than via SMTP. This solutions seeds up sending process because it does not require to connect to real smtp server. It can be deployed on application server (as default mailSession) and it's completely transparent for applications. You can choose transport one of:
- filemsg = emails are saved to files in mbox format
- filetxt = emails are saved to files in text format (only headers and text/plain part of message)
- nop = no file is created, only info in logs
- javamail-file-transport = javaMail transport that stores emails in files - for developers
- javamail-jms-transport = javaMail transport that sends email to JMS queue - for admins
- javamail-jms2javamail = an EJB that copies emails from JMS to real javaMail session - for admins
For configuration examples see docs/README.md
It takes 5 steps only to see how it works. You can download a webapp application, which works with jetty to see how it works.
- Clone project
git clone https://github.com/m-szalik/javamail.git
- Enter javamail-test-webapp directory
cd javamail/docs/examples/webapp-example/
- Run it with maven and jetty
mvn jetty:run
- Go to http://localhost:8080/webapp and click to send an email
- Use your favourite text editor to view an email located in target/messages directory
Apache License 2.0
In case of problems or questions contact me by creating an issue on GitHub or via .