Return-path in mail() not changing through script

Hello

I have a problem in the emails sent through php mail() and mb_send_mail(). The problem is related to the Return-path. I have tried to set it to something other than the default through the script but it is not changing, the messages are being delivered with the default settings.

Tried all the following


@ini_set("sendmail_from", $from);


$header .= 'Return-Path: <'.$from.">\
";

Header has FROM, Reply-To, X-Mailer, CC


$additional_parameter = '-f'.$from;

None of these worked… am I missing something?

Not sure what you’re getting at…

http://uk2.php.net/manual/en/function.mail.php#94170 ?

Tried this, and didn’t work

$additional_parameter = '-f'.$from.' -r'.$from;

Some environments like cPanel will strip out the ‘Return-Path:’ This work-around worked for me: http://www.justin-cook.com/wp/2006/03/14/php-socket_mail-an-alternative-to-mail/