Make SMTP class reset on unexpected responses (#2796)
Make SMTP class reset on unexpected responses (#2796)

The issue is always triggered by an error which is happening before, for example a `5.1.1 … Recipient address rejected: User unknown in virtual mailbox table` error. In such a case, `SMTP::mail` has already been called, so `$this->_mail` will be true. Thus attempts to issue another `mail` command will fail. In practice, multiple emails will fail only because of a single "real" error. A handful emails later, sending will work again. (Maybe because the SMTP server has reset the connection? I am not sure about this…)

I thought about the simplest way to avoid this. The SMTP class always uses `SMTP::_expect`, passing desired response codes. If the response codes are different from the expected ones, an `SMTPException` will be thrown. IMHO `SMTP::_expect` should **reset** (as in: `SMTP::rset`) immediately before throwing the exception. Not meeting desired response codes always means "error", and "error" means that we should "properly give up".

Picked from 98a0baa
bauhouse/sym-todo-list,michael-e/symphony-2,symphonycms/symphony-2,symphonycms/symphony-2,michael-e/symphony-2,bauhouse/sym-todo-list