views:

323

answers:

1

What is that return path for?

Can i Use in this way?

mail($to_address, $subject, $message, $headers, "-f".$return_path );

Where:

$return_path = "C:/www/project/handlebounceemail.php";

Additional:

How to direct the email to a php script? I want to read the email and check for errors.

A: 

The $return_path refers to the email address to which undeliverable messages will be sent. This does not refer to a file or URL. So you could use:

$return_path = "[email protected]";

The next step would be for you to write a script to read the mailbox of the bounces user and do something based on the contents. The exact operations required to do that are dependent on your email system.

Greg Hewgill
How should I refer to a file then? I need to direct it to a php file.
How to write a script that read particular bounced emails? Can give me a short example?