phpmailer - The following SMTP Error: Data not accepted

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

    Try to set the port on 26, this has fixed my problem with the message "data not accepted".

    0 讨论(0)
  • 2020-12-01 18:17

    your server dosen't allow different sender and username you should config: $mail->From like $mail->Username

    0 讨论(0)
  • 2020-12-01 18:17

    If you are using the Office 365 SMTP gateway then "SMTP Error: data not accepted." is the response you will get if the mailbox is full (even if you are just sending from it).

    Try deleting some messages out of the mailbox.

    0 讨论(0)
  • 2020-12-01 18:18

    I was experiencing this same problem. In my instance the send mail was timing out because my Exchange server was relaying email to a server on the internet. That server had exceeded it's bandwidth quota. Apparently php mailer has some built in timeout and it wasn't long enough to see the actual message.

    0 讨论(0)
  • 2020-12-01 18:28

    First you better set debug to TRUE:

    $email->SMTPDebug = true;

    Or temporary change value of public $SMTPDebug = false; in PHPMailer class.

    And then you can see the full log in the browser. For me it was too many emails per second:

    ...
    SMTP -> FROM SERVER:XXX.XX.XX.X Ok
    SMTP -> get_lines(): $data was ""
    SMTP -> get_lines(): $str is "XXX.XX.XX.X Requested action not taken: too many emails per second "
    SMTP -> get_lines(): $data is "XXX.XX.XX.X Requested action not taken: too many emails per second "
    SMTP -> FROM SERVER:XXX.XX.XX.X Requested action not taken: too many emails per second
    SMTP -> ERROR: DATA command not accepted from server: 550 5.7.0 Requested action not taken: too many emails per second
    ...
    

    Thus I got to know what was the exact issue.

    0 讨论(0)
  • 2020-12-01 18:29

    in my case I was using AWS SES and I had to verify both "FromEmail" and "Recipient". Once done that I could send without problems.

    0 讨论(0)
提交回复
热议问题