cancel
Showing results for 
Search instead for 
Did you mean: 

PHPMailer not sending all emails to all address

I am having trouble getting PHPMailer and CPanel to send ALL emails.  The script below sends 10 emails to the specified address.  Some receive all 10.  Others receive only 4 or 5.  Missing emails are not showing up anywhere (not even in spam).  Also script indicates successfully sent.  The missing emails are not necessarily in numerical order.  That means if 10 emails were sent then only messages 2,4,5,8,9 might be received.  HELP!!

 

Examples: 

     1. recipient  j**********@m********.com (10 out of 10 received, this is my GoDaddy hosted email)

     2. recipient  j**********@gmail.com (10 out of 10 received)

     3. recipient  j**********@yahoo.com (4 or 5 out of 10 received, nothing in SPAM)

     4. recipient  j**********@outlook.com (5 or 6 out of 10 received, nothing in SPAM)

     5. recipient  j**********@patton*****.net (10 out of 10 received, this is a private email server that I host)

 

<?php


require 'phpmailer/PHPMailerAutoload.php';

for ($x = 1; $x <= 10; $x++) {

     $mail = new PHPMailer;
     $mail->Host = "relay-hosting.secureserver.net";  //same problem when trying localhost
     $mail->Port = 25;
     $mail->SMTPDebug = 0;
     $mail->SMTPSecure = "none";
     $mail->SMTPAuth = false;
     $mail->Username = "";
     $mail->Password = "";
     $mail->IsHTML(true);

     $mail->setFrom('j*****@********.com', 'emailtest');  //the from address is my GoDaddy hosted email

     $mail->addAddress('j*******@outlook.com', 'Outlook');

     $mail->Subject = $x."- Outlook";
     $mail->Body .= $x." - Message";

if(!$mail->send()) {
     echo 'Guest invitation was not sent.';
     echo 'Mailer error: ' . $mail->ErrorInfo;
} else {
     echo $x.' - Outlook successfully.<br><br>';
}

 

}  //endof for loop

?>

3 REPLIES 3
Super User III
Super User III

Re: PHPMailer not sending all emails to all address

Hey there @mcohunts,

 

I noticed that the emails that dropped are to yahoo and outlook addresses. This is actually pretty common when using a PHP mailer because a lot of these free email providers block those emails out of hand. This is due the fact that spammers use these techniques consistently to push out their spam, so the email companies just block that traffic out of hand for the most part. They will allow a certain number through but there's no rhyme or reason as to why.

 

The easiest way to avoid this is to use an email product like Office 365 or G Suite.



I am a GoDaddy End User - Just Like You
Check out my site! | I drink and I know things. Especially about websites and web hosting.
* Please note that I offer free advice on this forum. If you would like personalized help, please contact me. Otherwise, please ask your question in the proper forum so the answer can assist EVERYONE in the community and not just you. Thanks! *

Once your issue is resolved,
please be sure to come back and click accept for the solution

Get Better Support on the Community Boards!
Etiquette When Asking for Help from the Community


Re: PHPMailer not sending all emails to all address

I changed the settings to use my GMail account with its smtp server.  Yahoo received 10 or 10.  Outlook.com still receiving only 5 or 6 of the 10.

 

 

Community Manager
Community Manager

Re: PHPMailer not sending all emails to all address

Hi @mcohunts - Typically, you wouldn't be able to send emails from a hosted website with GoDaddy via any other relay server than relay-hosting.secureserver.net. It is sometimes possible to get a 3rd party email server to work, but it's not supported by GoDaddy. However, if you were able to get it to work, but Outlook is still missing some of the emails, that would suggest the issue is on Outlook's end since it's happening for more than one sending server. You may want to reach out to their support to see if you can find out why the messages are getting rejected.

 

JesseW - GoDaddy | Community Manager | 24/7 support available at x.co/247support | Remember to choose a solution and give kudos.