phpmailer - The following SMTP Error: Data not accepted

后端 未结 15 1076
半阙折子戏
半阙折子戏 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:11

    I was hitting this error with phpMailer + Amazon SES. The phpMailer error is not very descriptive:

    2: message: SERVER -> CLIENT: 554 Transaction failed: Expected ';', got "\"
    1: message: 
    2: message: SMTP Error: data not accepted.
    

    For me the issue was simply that I had the following as content type:

    $phpmailer->ContentType = 'text/html; charset=utf-8\r\n';
    

    But that it shouldn't have the linebreak in it:

    $phpmailer->ContentType = 'text/html; charset=utf-8';
    

    ... I suspect this was legacy code from our older version. So basically, triple check every $phpmailer setting you're adding - the smallest detail counts.

提交回复
热议问题