I'm running a MAMP setup locally and recently discovered the postfix setting which is a life saver. Only downside is, my local machine could now send mails to any and every other mail address. I wouldn't want to send mails to clients when I'm testing the website on my machine.

Is it possible to configure PHP to reroute all outgoing mail to a certain email address? Another solution would be ignoring all mail actions for email addresses which don't comply with a certain format.

Allowing "@myhost.com" but ignoring "@anyotherhost.com".

Thanks in advance!

link|improve this question
1  
One would configure Postfix for this, not PHP. – Ignacio Vazquez-Abrams Feb 2 at 10:33
feedback

migrated from stackoverflow.com Feb 2 at 21:00

This question came from our site for professional and enthusiast programmers.

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown