17
votes

So i just received this error when trying to send an mail using PHPmailer from my site.

SMTP Error: The following recipients failed: XXXX

I tried to set $mail->SMTPAuth = true; to false but no result. And i tried to change the password for the mail account and update that in the sendmailfile.php but still the same.

It worked as intended two days ago, now i don't know why this is happening. Since there ain't any error code either i don't really know where to begin and since it did work..

Anyone who might know?

    $mail = new PHPMailer();
    $mail->CharSet = 'UTF-8';
    $mail->ContentType = 'text/html';
    $mail->IsSMTP();
    $mail->Host = "HOST.COM";
    $mail->SMTPAuth = true;
    $mail->Username = "MAIL_TO_SEND_FROM"; 
    $mail->Password = "PASSWORD"; 
    $mail->From = "MAIL_TO_SEND_FROM";
    $mail->FromName = "NAME";
    $mail->AddAddress($safeMail);
    $mail->AddReplyTo("[email protected]", "No-reply");
    $mail->WordWrap = 50;
    $mail->IsHTML(true);
    $sub = "SUBJECT";
    mail->Subject = ($sub);
9
use something like this to get a more use full error message :phpmailer.worxware.com/index.php?pg=exampleamailuser557846
Now i got some more info: SMTP -> ERROR: RCPT not accepted from server: 550-Verification failed for 550-No Such User Here 550 Sender verify failed SMTP Error: The following recipients failed: XXXXMarkus
Please get PHPMailer from Github. That site has not been supported for years: github.com/PHPMailer/PHPMailerSynchro
Just as a point to consider. I had encountered the same issue due to the wrong password also.Varshaan

9 Answers

22
votes

I've encountered the same problem. Managed too fix it when i commented the next row:

 $mail->isSMTP(); 

Noticed you already found an answer, however maybe this will fix the problem for other people.

This does prevent using your external SMTP server as RozzA stated in the comments.

18
votes

Maybe your class.phpmailer.php file is corrupt. Download the latest version from : https://github.com/PHPMailer/PHPMailer

$mail->SMTPDebug  = 1; // enables SMTP debug information (for testing)
                               // 1 = errors and messages
                               // 2 = messages only
2
votes

try inlcuding this

$mail->SMTPDebug  = 1;
2
votes

Just try to set SMTPAuth to false.

2
votes

It is a restriction from your SMTP server. Sending e-mail messages is a vital part of the ever-growing Internet business. Sometimes, a large number of e-mails are required to be sent daily, even hourly. With this comes also the ever-increasing problem with the e-mail spam, and the countless number of junk messages users receive constantly.

The most common restrictions are:

150 e-mails per hour; 1500 e-mails per 24 hours; 50 recipients per message, where each recipient is counted as a separately sent e-mail message (e.g. if you have 50 recipients in a single message, this willcount as 50 sent messages);

One solution is to use a mailing list, then the restriction is 1500 e-mails for 24 hours. There's no restriction for the amount of emails sent per hour, i.e. you can send an email to a mailing list with up to 1500 recipients without a problem.

If you reach the hourly/daily limit you will get this error when trying to send further e-mails: 550 - Stop, you are sending too fast!

You will be able to send e-mails again, once the hour/day has passed.

Things you should know in order to avoid exceeding your limit:

The above e-mail restrictions are valid for the entire hosting account, and not for a single mailbox. This means, that if one of your mailboxes exceeds the allowed limit, you will not be able to send messages from any of your other e-mail accounts. If, at any point you receive the afore-mentioned error message, it is highly recommended to stop all attempts to send messages from your mailboxes. If you continue trying, your messages will be left in a mail queue, which will have to clear first, before the server timer can reset and allow you to send e-mails again.

0
votes

there is a slightly less probable problem.maybe this condition is caused by protection placed by your ISP.and you said it worked well two days ago.maybe that is the problem.try contacting your ISP.

or maybe its a problem with the recipients/senders email adresses

0
votes

Here is some additional info about SMTP Auth

PLAIN (Uses Base64 encoding.) LOGIN (Uses Base64 encoding.) e.t.c - you can watch here http://en.wikipedia.org/wiki/SMTP_Authentication

For me solution was to set SMTPAuth to true for PHPMailer class

0
votes

Please note in your lines i.e....

$mail->Username = "MAIL_TO_SEND_FROM"; $mail->Password = "PASSWORD"; $mail->From = "MAIL_TO_SEND_FROM";

Here at Line 1 and 3 you have to use same email address (You can't use different email address), this will work sure, I hope u r using different email address, (Email address must be same as username/password matching).

0
votes

for Skip sending emails to invalid adresses; use try ... catch

$mail=new PHPMailer(true);
try {
$mail->CharSet = 'utf-8';  
$mail->isSMTP();
$mail->isHTML(true);
$mail->Host = 'smtp.yourhost.com';
$mail->Port = 25;
$mail->SMTPAuth = false;
$mail->Username = 'xxxx';
$mail->Password = 'xxxx';
$mail->SMTPSecure = 'tls';
$mail->SMTPDebug = 0;
$mail->MailerDebug = false;
$mail->setFrom($absender, $name);
$mail->addAddress($to);
$mail->Subject = $subject;
$mail->Body = $message_other_player;
}

$mail->send();
      // echo 'Message has been sent';
   } catch (Exception $e) {
     //  echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}";
   }

PHPMailer - Skip sending emails to invalid adresses