phpmailer - The following SMTP Error: Data not accepted

后端 未结 15 1068
半阙折子戏
半阙折子戏 2020-12-01 17:34

I\'m trying to figure out this issue for 6 hours. But there is nothing to make sense. Here is the scenario; There is a well formatted HTML template.

<         


        
15条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-01 18:14

    I was using just

    $mail->Body    = $message;
    

    and for some sumbited forms the PHP was returning the error:

    SMTP Error: data not accepted.SMTP server error: DATA END command failed Detail: This message was classified as SPAM and may not be delivered SMTP code: 550

    I got it fixed adding this code after $mail->Body=$message :

    $mail->MsgHTML = $message;
    $mail->AltBody = $message;
    

提交回复
热议问题