PHPMailer/PHPMailer — pull request #311 by heronman (2014-11-08 23:07:20+00:00)
Title: A bugfix in SMTP::authenticate, plus some improvements

- bugfix: in SMTP::authenticate(), when $authtype passed with unsupported method, the function returned True
- SMTP::sendCommand() - parse an extended SMTP code (if exists) to the SMTP::error array. Called it "smtp_code_ex". Also, strip out SMTP codes from all lines in "detail" field.
- SMTP::sendHello() - parsing a positive reply to discover SMTP extensions available. Methods added: parseHelloFields, getServerExtensions, getTLSAllowed, getAuthAllowed
- SMTP::authenticate() - added automatic method selection (according to server-allowed and client-allowed methods), and some checks for authentication avaliability