The reply and return path can be placed in the header as shown below -
$headers = 'From: sample@example.com' . "\r</p><p>" . 'Reply-To: sample@example.com' . "\r</p><p>" . 'Return-Path: sample@example.com'
Otherwise, it can be passed as the fifth parameter to change the return path -
mail($to, $subject, $message, $headers, "-f email@wherever.com");
Here, “email@wherever.com” must be replaced with the respective email ID of the user.
The above is the detailed content of Change Return-Path in PHP mail function. For more information, please follow other related articles on the PHP Chinese website!