Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In my development PC I want to see all mail sent using PHP mail() function. Is there any dummy mail server that could show all sent mail (regardless of their recipient) and collect them in a mail box to preview?

share|improve this question
up vote 5 down vote accepted

Here you go: smtp4dev

Windows 7/Vista/XP/2003/2010 compatible dummy SMTP server. Sits in the system tray and does not deliver the received messages. The received messages can be quickly viewed, saved and the source/structure inspected. Useful for testing/debugging software that generates email.

share|improve this answer

phi's solution is great if you have a Windows environment.

If you have a Linux environment - then you can setup postfix to deliver all email to a local mailbox.

Here is a link to get you started -

Create /etc/postfix/virtual-regexp with the following content:

Edit /etc/postfix/ and add regexp:/etc/postfix/virtual-regexp to the virtual_maps configuration. The end result might look like this in

virtual_maps = hash:/etc/postfix/virtual, regexp:/etc/postfix/virtual-regexp
Build the mapfile by typing:

postmap /etc/postfix/virtual-regexp
This also requires a virtual.db to exist. If it doesn't create an empty file called virtual and run : postmap /etc/postfix/virtual

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.