-
-
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
Godaddy not sending to gmail #2912
Comments
There are some notes on GoDaddy in the troubleshooting guide. You don't need to call |
Thank you for this quick reply and for understanding the issue. Do you mean I should modify the DNS or perhaps just include the DNS in the script? When I added secureserver.net, the PHPMailer script sent to Gmail account if it was in the first email sent but it ignored the second email sent to any email address (I instantiated PHPMailer twice to send two emails in the original script). This was also the case for a form plugin - the second email would no longer be received. Perhaps I need the specific server: a2plcpnl0132.prod.iad2.secureserver.net? I have already seen and tried what was mentioned in the troubleshooting guide. Thanks for that as well. |
This is another reason for using SMTP to localhost – you can see what your local mail server is doing when you submit messages by setting |
Thanks again. I had used the debug before and saw it sent; however, I did wonder about this line:
Full message follows.
Here is the code: $mail = new PHPMailer();
$mail -> SMTPDebug = 2;
//function mailEtransfer($data) {
$mail->isSMTP();
$mail->Host = 'localhost';
$mail->SMTPAuth = false;
$mail->SMTPAutoTLS = false;
$mail->Port = 25;
$mail->setFrom('[email protected]', 'Nanps');
$mail->addAddress('[email protected]', 'Andrea R');
$mail->Subject = 'NANPS Membership';
$mail->Body = 'hi Andrea 102';
if($mail->send()){
echo 'Message has been sent.';
}else{
echo 'Message could not be sent.';
echo 'Mailer Error: ' . $mail->ErrorInfo;
} |
That transcript looks fine. That message is normal, and is just describing what the client's response to a
|
Noticed that it says SERVER: QUIT. Do you know if that means it quit and didn't send? |
More precisely it says |
First, thanks again for all the response. I will do the second email a different way. Are you suggesting that I do need to add the secureserver.net to the SPF TXT record? Unfortunately, that caused other mail issues (second email wasn't working for the form plugin and PHPMailer). Perhaps I need to be more specific and add this: a2plcpnl0132.prod.iad2.secureserver.net? |
No, you should include GoDaddy's SPF as per their docs. It's their job to ensure that all their servers (of which there will be many, and probably change often) are in there. SPF is concerned with the IPs mail is coming from; the names don't matter. If you have a problem with your second mail, you need to show exactly what the problem is. |
This is just a small test script created to see why I can't get PHPMailer to send to gmails accounts. The script appears to send to other accounts (look.ca, hotmail), but not to the gmail accounts tested (at least 4). Hosted by godaddy. When I uploaded to another client's website hosted by canaca.com, the script sends to the gmail accounts. I have also tried SMTP on the godaddy website and it appeared to send. Sendmail sends to all accounts tested (gmail, etc) outside of the PHPMailer library. This suggests to me that perhaps PHPMailer requires permissions to send to gmail. Godaddy added this txt record for me to the DNS: v=spf1 include:_spf.google.com ~all
Nothing seems to work. I modified the TXT record to include secureserver.net as a server and then the script sent but only to the first email. It caused problems for other forms (using wordpress and contact form 7), so I removed it as per godaddy's instructions.
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
require 'PHPMailer/src/Exception.php';
require 'PHPMailer/src/PHPMailer.php';
function mailEtransfer($data) {
$mail = new PHPMailer();
$mail->isSendmail();
$mail->setFrom("[email protected]", "xxxxx");
$mail->addAddress("[email protected]", "Andrea Rosen");
$mail->Subject = "XXXX Membership";
$mail->Body = "hi Andrea time 1208";
if($mail->send()){
echo "Message has been sent.";
}else{
echo "Message could not be sent.";
echo "Mailer Error: " . $mail->ErrorInfo;
}
}
The text was updated successfully, but these errors were encountered: