Email is a great way to communicate something to the end user asynchronously. You can review the message anytime you want.  As Developers we often need to make some kind of logic which uses emails eg. reminders , alerts etc. While testing it is common to just send an email through smtp server. Receive it , check it etc.

But ?

What to do when you or your client doesn’t have an smtp server [or your admins doesn’t have time to configure it properly] ? Well there is a simple app which creates such a “testing server”

Papercut

Papercut is a simplified SMTP server designed to only receive messages (not to send them on) with a GUI on top of it allowing you to see the messages it receives. It doesn’t enforce any restrictions on addresses, it just takes the message and allows you see it. It is only active while it is running, and if you want it in the background, just minimize it to the system tray. When it receives a new message, a balloon message will show up to let you know.

Picture

Pic 1. Papercut Options Windows

Testing

Let’s test Papercut with a simple app.

public static void Main(string[] args) 
{ 
    SmtpClient client = new SmtpClient("192.168.0.128",25); 
    MailMessage msg = new MailMessage("[email protected]", "[email protected]",  
       "Testing mail", "Testing Body"); 
    client.Send(msg);
}

 

Papercut works in the background. When the message is received you get a nice popup, and you can check the message.

test

Pic 2. You can check the message.

As you can see it’s a great app which can be useful in many different scenarios.