views:

247

answers:

2

Hello,

I use a PHP mailer with of my online programs and recently when I look in outlook I see '[email protected] on behalf of My Mailer [[email protected]]' when I receive emails from any of my domains.

Previously the [email protected] was [email protected]:

Return-path: <[email protected]>
Received: from nobody by host.validns.com with local (Exim 4.69)
    (envelope-from <[email protected]>)

It used to be fine like that, but something on my hosts side changed and now I get the 'on behalf of'. Anyone know why this is occuring now, and not before (since all that changed was nobody to somebody!) and how to resolve it?

Thank you,

Phil

+2  A: 

Sounds like you need to set the from header in your mailer.

Mail servers will usually append their own if one isn't found.

in normal php it'd be something like


$headers = "FROM: 'fromname' <[email protected]\r\n>";

mail($to, $subject, $body, $headers);
rezzif
A: 

I already had the From in the header, but I overlooked one difference in the header:

Sender: <[email protected]>

This line popped up in all emails from my host, even those sent by the cron daemon. Getting this removed resolved the issue.

Thanks though!

--Phil