Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Good way to test email functionality

Tags:

email

testing

Working on an app with notification via e-mail. I'd like to run test with out sending e-mails to production servers and clients. A couple years ago I remember someone bringing down our exchange server with a bad e-mail loop and would prefer to not repeat...

Any suggestion for a dev setup? Currently think a simple SMTP server will do the job but I'm not familiar with that space. I would need the ability to see all the emails sent to the server but they should never be delivered.

Thanks.

like image 656
jason saldo Avatar asked Dec 10 '08 20:12

jason saldo


People also ask

What should I test in my emails?

Time of day, day of the week, and frequency are a good way to start. You can also test timing of emails for particular trigger events or timing around it.

How do I do a test email in Outlook?

All you need to do is click on "New message" on the Outlook website. In the "To" field of the new email, you can type your own email address. In the "Add a subject" field, you can type "Test Email" if you want to. Again, you can type anything you want into the main email body area.


2 Answers

Papercut is the perfect fit for what you are looking for. It has been publicly available for the last couple of months. I have been using it for a month. It couldn't get any easier to test email functionality.

  1. Download Papercut.
  2. Run Papercut, while running it sits in your tray.
  3. Configure your application's smtp host to the machine running Papercut.
  4. Watch Papercut receive the emails and view the contents.
  5. When you are done. Close Papercut.
like image 66
Dale Ragan Avatar answered Sep 18 '22 13:09

Dale Ragan


It's pretty simple to set up an alias that is delivered to a file instead of through any delivery mechanism in any of the major Unix/Linux mail servers like Postfix or Sendmail. During the testing, you can tail that file to see that the mail is getting send when you expect it to. After your testing is over, you can re-direct it to where-ever it's really supposed to go.

like image 45
Paul Tomblin Avatar answered Sep 16 '22 13:09

Paul Tomblin