We all have been in situations where our application is sending out mails and we want to test the output. This seems simple but in my case SMTP server was in a different network and our corporate firewall restrictions were making it complicated and time consuming. I thought of finding a simpler solution and after some googling stumbled upon PaperCut
Its a simple receive only SMTP server which is super easy to setup and once started captures all outgoing emails from your system which are send via localhost SMTP server and shows them in a nice UI. It allows you to inspect everything about your email from its body to header to mime types.
Setting up PaperCut
- Setup your code to send mail after ovveriding the following SMTP details
- SMTP Server : localhost
- SMTP Port : 25
- EnableSSL : False
- Download PaperCut and start the exe
- Send email and wait for a few seconds, it should appear in the PaperCut window and you can inspect all the details you like about your email message
It does give you options to target a particular IP address and Port if you so desire. I haven’t tried it though.