Processing bounces from PHP

On my site, users can have an email sent to someone else. For the bounce address, I use one of my site’s email addresses ( Can I process those bounces from PHP and then send another email to the user that “sent” it - telling them that there was a problem sending the email?

I can put their own email address as the bounce address, but then the bounce lists dreamhost’s mail server.



I’m currently trying to do something similar. According to the online docs at, imap_open and related functions can read email for automated processing. I’m planning to use a cron job to check for email and process every few minutes.

Unfortunately, these functions appear to be disabled here at DH. Perhaps there is a suitable function in PEAR?
Please let me know what you find, I’ll do the same…

Not so much “disabled”, as simply not installed. You can always compile your own PHP and include these functions if you desire. See the Dreamhost Wiki for how to install/configure your own version of PHP.


Please see my recent post here on using imap_open for a script that reads incoming emails using php.
(This requires the PHP5 custom installation.)