S
S
sonriente2011-02-27 10:36:42
gmail
sonriente, 2011-02-27 10:36:42

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

2 answer(s)
I
isden, 2011-02-27
@isden

stackoverflow.com/questions/4543068/exim-overwrites-from-header-when-sending-mime-email-from-php not?

C
charon, 2011-02-27
@charon

By the way, gmail will always rewrite Sender:, so in many email programs your recipients will see that the email came from "[email protected] on behalf of [email protected]"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question