It is a good idea to configure the Return-path in order to make sure you receive notification of any bounced mail,
and also to eliminate the "on behalf of" notice that may appear in Outlook.
One way to configure Return-path is to use the fifth paramater of the mail() function, for example:
$Sender = 'sender@senderdomain.com';
mail ( 'recipient@somedomain.com', 'Hello', 'Message Content', "From:$Sender", "-f$Sender" );
Another way is to configure the sendmail_path setting in a custom php.ini file in your public_html directory, for example sendmail_path = "/usr/sbin/sendmail -t -i -f sender@senderdomain.com"
Note, on Linux you cannot use the sendmail_from setting nor can you use ini_set() to control sendmail_path.
|