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
amazing docker
https://hub.docker.com/r/mailhog/mailhog/
(gitHub - https://github.com/mailhog/MailHog)
This docker has two ports:
One port for sending SMTP e-mails (smtp://0.0.0.0:1025/)
A second port to the e-mail display on the web (http://0.0.0.0:8025/)
run docker:
docker pull mailhog/mailhog
docker run --name=mailhog -d -p 1025:1025 -p 8025:8025 mailhog/mailhog
on Leopard you can start a Local SMTP Server (Postfix) on OS-X Leopard
before the closing tag at the end:
then start the thing with
now you check wheter the service is running with:
I've used Mailtrap a few times, and I can recommend it.
You can use Wiser in the SubEthaSMTP library, Wiser's purpose is exactly what you want, unit testing.