"Failed to authenticate on SMTP server with username using 2 possible authenticators"

"Failed to authenticate on SMTP server with username using 2 possible authenticators"

We are developing a project in PHP Laravel framework, we using zoho smtp mail services on that.


Its was working good and its suddenly stoped with following error:  "Failed to authenticate on SMTP server with username using 2 possible authenticators"


Here is our configuration..



<?php

function send_mail($to, $subject, $message_body, $from, $from_email) {
    date_default_timezone_set('Asia/Manila');
    require_once("phpmailer/class.phpmailer.php");

    $message = $message_body;

    $mail = new PHPMailer();
    $mail->IsSMTP(true); // send via SMTP 
    $mail->SMTPAuth = true; // turn on SMTP authentication
    $mail->Mailer = "smtp";
    //$mail->SMTPDebug = 2;

    $mail->Host = "smtp.zoho.com"; // SMTP servers
    $mail->Port = 465;    
    $mail->SMTPSecure = 'ssl'; 

    $mail->Username = " admin@mydomain.com"; // SMTP username
    $mail->Password = "mypassword"; // SMTP password
    $mail->FromName = $from; // From Name
    $mail->From = $from_email; // From Email

    $mail->AddAddress($to);

    $mail->AddReplyTo($from_email, $from);

    $mail->IsHTML(true); // send as HTML

    $mail->Subject = $subject;
    $mail->Body = $message; //HTML Body
     
    if(!empty($subject)){
        if (!$mail->Send()) {
            //$mail->ErrorInfo
            return "Failed";
        } else {
            return "Success";
        } 
    }
}