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
2009-09-02 08:28:33