How can I configure PHP to send all outgoing mail to my own account so that I can test a business application without actually sending mails to unsuspecting businesses, such as “Congratulations, you have a new account. You will be billed for $xxx” ?
Share
I found this site: http://dummysmtp.com/.
My server is running qmail, so I edited the contents of /var/qmail/control/smtproutes like so:
It worked when I sent a simple mail with PHP mail(), but later I found that mail is still getting out to other people. I had to crawl into the bowels of the code and found this:
So I had to make sure that each option was configured to send its mail to dummysmtp.com. Once I got that figured out, it all worked.