Jürgen Paul
Jürgen Paul

Reputation: 15007

Configuring exim's outgoing e-mail address

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

Answers (1)

InternetSeriousBusiness
InternetSeriousBusiness

Reputation: 2635

Set your envelope From.

mail($recipient, $subject, $body, $headers, '-f [email protected]');

Upvotes: 2

Related Questions