Reputation: 15007
I forgot how I set it. I have two websites and I send the e-mail through my second site. Here's my /etc/exim4/passwd.client
file:
*.google.com:[email protected]:password
*.google.com:[email protected]:password
I'm sending mail through PHP's mail()
function with the following headers:
$headers = 'From: no-reply <[email protected]>' . "\r\n";
$headers .= 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Reply-To: [email protected]' . "\r\n";
$headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";
But I am getting this header on my client's email:
from: no-reply firstsite.com
reply-to: secondsite.com
to: [email protected]
How do I properly set a custom outgoing e-mail address for exim?
PS: I'm using a smarthost (Google apps)
Upvotes: 1
Views: 956
Reputation: 2635
Set your envelope From
.
mail($recipient, $subject, $body, $headers, '-f [email protected]');
Upvotes: 2