Answer the question
In order to leave comments, you need to log in
exim4 vs gmail smtp vs gmail FROM field
Hello.
Configured exim as MTA on vds to send mail via gmail smtp. (I use several addresses on the same domain in google apps).
I didn’t make any special adjustments, I just added this:
Everything works, but there is one caveat:
The address [email protected] is always shown in the FROM field, despite the fact that I explicitly specify a different address in the script. And I want to see the correct address ([email protected] gmail.com or any other specified):
The letter will be something like this:
From: [email protected]
Reply: [email protected]
Apparently, I was banned in Google, but I did not find a solution to this seemingly obvious question .
gmail_login:
driver = plaintext
public_name = LOGIN
client_send = : [email protected] : mypassword
$to = 'myaccount[email protected]';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: [email protected]' . "\r\n" .
'Reply-To: [email protected]' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
if (mail($to, $subject, $message, $headers)) {
echo 'mail() Success!' . "
\n";
}
else {
echo 'mail() Failure!' . "
\n";
}
Answer the question
In order to leave comments, you need to log in
stackoverflow.com/questions/4543068/exim-overwrites-from-header-when-sending-mime-email-from-php not?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question