I want to test a Java code for sending email. I don't want to use any commercial mail client or connect to any external mail providers (like Gmail or Yahoo). I would like to know if there is any software which allows a user to configure dummy email addresses and server (locally) which can be used in my software to send and receive mails. I just want to test the functionality of the Java code.
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
The javamail-file-transport saves emails to files instead of sending them through SMTP server.
See the javaMail extensions project on GitHub.
It adds file transport that allows:
text
format instead of sending themmbox
format instead of sending themTry GreenMail. It's geared towards JUnit usage, but it should do what you need. You can run it in a JBoss instance or have your JUnit tests send mail to themselves, depending on your specific needs.
There are a few other similar bits of software out there, but that's the one I've used and was reasonably happy with it.
I prefer Fake SMTP for this. It's a desktop app (packed into jar file). Since it is written in Java, you can run it both from Linux/Mac/Windows
use the Aspirin From the docs: Aspirin is an embeddable send-only SMTP server for Java developers.
You can use smtp4dev. Please find out more details here.
For email testing, try Dumbster. From that page: