SMTP Error: data not accepted.

  • This happens in PHPMailer, so not my wheelhouse, but the code that throws the exception is this:


    PHP
    1. <?php
    2. // Only send the DATA command if we have viable recipients
    3. if ((count($this->all_recipients) > count($bad_rcpt)) and !$this->smtp->data($header . $body)) {
    4. throw new phpmailerException($this->lang('data_not_accepted'), self::STOP_CRITICAL);
    5. }

    So looks like that throws if there's no good recipients of if PHPMailer_SMTP::data() returns false.

    That method appears to be the part that actually sends the content of the message over the created SMTP connection. Anything going wrong in that process will result in the above error, including timeouts.


    It looks like the connection can be made and authenticated, but for some reason the server isn't accepting the headers and body of the message.