tags:

views:

381

answers:

2

When using PHP to send email, how can I set the return path for receiving bounced back emails?

+1  A: 

There is a parameter in mail() that allows user to set additional headers. You should set a "Return-Path" header, like this:

mail($email, $subject, $message,
"From: $returnaddress\n"
. "Reply-To: $returnaddress\n"
. "Return-Path: $returnaddress);
n1313
A: 

Check out my similar question with several good responses.

http://stackoverflow.com/questions/965986/preventing-delivery-status-notification-errors-or-email-replys

Jason