# Bounce Email handling with PHP?

**URL:** <https://forums.interworx.com/t/bounce-email-handling-with-php/20109>\
**Category:** General Inquries\
**Created:** [July 21, 2020, 1:44am UTC](https://forums.interworx.com/t/bounce-email-handling-with-php/20109 "2020-07-21T01:44:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://forums.interworx.com/uploads/default/original/2X/4/40ab17cc34b792a0172b48ad1333b9ba9299a9a1.png) [@system](https://forums.interworx.com/u/system)\
**Post date:** [July 21, 2020, 1:44am UTC](https://forums.interworx.com/t/bounce-email-handling-with-php/20109/1 "2020-07-21T01:44:35Z")

</div>

Here is my scenario:

I have 2 email accounts: [admin@domain.com](mailto:admin@domain.com) and [bounce@domain.com](mailto:bounce@domain.com).

I want to send email to all my users with [admin@domain.com](mailto:admin@domain.com) but then “reply to” [bounce@domain.com](mailto:bounce@domain.com) (until here, my PHP script can handle it).

When, the email can’t be sent, it’s sent to [bounce@domain.com](mailto:bounce@domain.com), the error message could be 553 (non existent email …) etc.

My question is: How do I direct all those bounce emails (couldn’t-sent emails) to [bounce@domain.com](mailto:bounce@domain.com) through a handling script to check for the bounce error codes?

What programming language should I be using for the “handling script”?

What would the “handling script” look like? Can you give a sample?

in other words:

What are the procedures I should follow to handle the bounce email ?
