-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
From property doesn't work #55
Comments
Can you provide some more info? De-personalised headers would be good. |
What info do you need @Synchro ? |
Like I said - the received headers you're seeing, the values you're putting into your config. I don't know what you mean by 'SMTP address'. |
Oh right. By SMTP adress, I mean SMTP host (GMail here). Code - SMTP config : $phpmailer->IsSMTP();
$phpmailer->Host = 'smtp.gmail.com';
$phpmailer->SMTPAuth = true;
$phpmailer->Username = 'alctest76@gmail.com';
$phpmailer->Password = '__';
$phpmailer->SMTPSecure = 'ssl';
$phpmailer->Port = 465; In the header, I have : "From: Val alctest76@gmail.com". |
I think gmail doesn't let you set From to an address, which isn't confirmed in your gmail account. |
Can you view source on the message and paste the exact headers? What would be useful is to get the headers generated before sending (look at What @sabl0r is probably true too. Incidentally you're using obsolete settings for gmail - you should be using:
|
I modified the SMTP for GMail, thanks for that ! And finally, here is the headers :
|
That's good - we can see that the 'From' header is missing an address. Now for checking what was sent:
and compare the two (ignoring 'received' headers). If the From header was set correctly before sending, it does indeed look like gmail is stripping it. |
I tried to put your code before the email sending but it gives me an error : |
Either subclass it or call GetSentMIMEMessage() instead. |
What I have with Date: Thu, 2 May 2013 17:55:44 +0000 Return-Path: To: valx76@gmail.com From: Wordpress testing Subject: Newsletter to contributors Message-ID: <1714bd4c92518b8e7644c30334bfbae2@127.0.0.1> X-Priority: 3 X-Mailer: PHPMailer 5.2.6 (https://github.com/PHPMailer/PHPMailer/) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="b1_1714bd4c92518b8e7644c30334bfbae2" So, Gmail seems to break the Thanks for the help, I'm closing the issue ! |
Hi,
I have a problem with the "From" property in PHPMailer.
I'm using GMail (as SMTP and sender) and when I receive a mail sent by PHPMailer, it has the good "FromName" property but not the "From" one (it shows the SMTP address instead).
That's my code :
Thanks !
The text was updated successfully, but these errors were encountered: