Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

503 Bad sequence of commands if count($this->all_recipients) == count($bad_rcpt) #156

Closed
eddi13 opened this issue Dec 22, 2013 · 0 comments

Comments

@eddi13
Copy link

eddi13 commented Dec 22, 2013

PHPMailer::smtpSend();
if all recipients is bad (count($this->all_recipients) == count($bad_rcpt)), then expected SMTP server reset or quit command, will nevertheless be sent DATA command.

If it wants to send a letter to multiple addresses in a loop, you beckommt after this failure, for each address, whether right or wrong, a rejection of the SMTP Server - 503 Bad sequence of commands, and no further emails of this loop be sent.
----------------------IMHO-------------------------
I have patched with me so:
rather than simply as

    if (!$this->smtp->data($header . $body)) {
        throw new phpmailerException($this->lang('data_not_accepted'), self::STOP_CRITICAL);
    }

yet to check the number that undeliverable addresses

    if (count($this->all_recipients) > count($bad_rcpt) && !$this->smtp->data($header . $body)) {
        throw new phpmailerException($this->lang('data_not_accepted'), self::STOP_CRITICAL);
    }

------------------------IMHO------------------------
The whole was tested at GMX SMTP with $this->SMTPKeepAlive == true and $this->SMTPKeepAlive == false

@Synchro Synchro closed this as completed in 15f53e6 Jan 3, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant