I know i'm doing something stupid here, but I can't figure it out. I'm sending an email using the following:
$headers = "MIME-Version: 1.0
From: ".$from_email."
Bcc: ".$bcc_email."
";
mail($email, $message['subject'], $message['content'], $headers);
where $from_email = 'no-reply@mydomain.com'
The message is coming through with the wrong from address. full headers below:
Return-path: <cli@hostxxx.com>
Envelope-to: xxx@email.com
Delivery-date: Tue, 20 Nov 2012 11:01:34 -0500
Received: from cli by cli@hostxxx.com with local (Exim 4.69)
(envelope-from <cli@hostxxx.com>)
id 1TaqGI-000232-IJ
for xxx@email.com; Tue, 20 Nov 2012 11:01:26 -0500
To: xxx@email.com
Subject: Fairway Solutions - Your new password
MIME-Version: 1.0
From: no-reply@mydomain.com
Bcc: support@mydomain.com
Message-Id: <E1TaqGI-000232-IJ@host.com>
From: cli@hostxxx.com
Date: Tue, 20 Nov 2012 11:01:22 -0500
Annoyingly, i can see the From coming through correctly, but it's like the received is overwriting with the hosts' info. Am I missing something at a server level?
I've also tried setting it in the php.ini file (ini_set(sendmail_from,no-reply@mydomain.com);
) and it's made no difference.
ta