Dummy SMTP Server Send Email Java
Sending email from java is an easy task. In development environment usually company blocks use of SMTP server from development environment. You could use only authorized box to send and receive an email. In this situation unit testing of our email program is difficult task. Dummy SMTP server is very suitable in this scenario that can be use to test email functionality without using any authorized SMTP server. I did test on many dummy SMTP server and found FAKESMTP is right choice to use an dummy SMTP server and it’s easy to use.
- Download FAKESMTP server from here
- Once download is completed unzip the file. You will see fakeSMTP-xxx.jar (In my case it is fakeSMTP-1.13.jar) got extracted. Because it’s an executable jar file, so that you can double click to open it. You will see as below, click start to start the server.
- As you see FAKESMTP server started on port number 25 on localhost (You can also change the port if you want). Use below java program to send and test email:
Download fakeSMTP-latest if you don’t find it.