PHPMailer .Exception:SendAsDeniedException.MapiExceptionSendAsDenied

前端 未结 4 682
南笙
南笙 2020-12-20 19:26

I have installed PHPMailer on my website. But, I can\'t get it to work the way it should. When I send an email through the website, I get the following error:



        
4条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-20 19:46

    I solved by change

     $mail->setFrom('test@hostinger-tutorials.com', 'Your Name');
    

    To be the same $mail->Username

     $mail->Username = 'example@hotmail.com';
    

    to be like that :

    $mail->setFrom('example@hotmail.com', 'Your Name');
    

提交回复
热议问题