I have a WordPress-based website and emails being sent to generic addresses on my domain, like president@example.com, press@example.com, etc.
Is there a way to receive all emails to my domain, process them through a PHP page (or any other kind of server-side script), and forward them to a new email address based on the script? I want to be able to automatically forward emails to different users on my site. For example, emails sent to president@example.com would check the WordPress database to see who is the current President of the organization, and forward the message to the user email on file for him.
It would probably be best to integrate with a third party service such as Mailgun. They have a feature that POSTs incoming mail to a script on your server, which you can then parse using PHP.
For more documentation on Mailgun’s feature specifically, see this page.
You need a Catch-All email address for your domain. A catch-all email address will receive emails sent to any email addresses that do not exist on your domain.
http://en.wikipedia.org/wiki/Catch-all
Is that a possible solution to your problem?