How to specify the exact default
Return-Path for PHP mail() scripts in Plesk?
Return-Path includes the system user assigned to the domain that is executing the script with the function
mail() (i.e. [email protected] for user jdoe on the subscription example.com).
The functionality of changing this setting via Plesk UI is yet to be implemented. You may vote for such a possible feature on the UserVoice portal.
The top-ranked suggestions are likely to be included in the next versions of Plesk.
Some possible workarounds can be applied here:
For a particular script
$to = "[email protected]";
$subject = "Test email";
$txt = "Hello world!";
$headers = "MIME-Version: 1.0" . "rn";
$headers .= "Content-type:text/html;charset=UTF-8" . "rn";
$headers .= 'From: [email protected]' . "rn";
$headers .= 'Return-Path: [email protected]' . "rn";
mail($to,$subject,$txt,$headers, "-f [email protected]");