cakephp/cakephp — pull request #3013 by ndm2 (2014-03-13 14:12:37+00:00)
Title: 3.0 - SMTP transport - Extensibility and response access

So I had to extend transports pretty often, namely the SMTP transport, and most often I ended up overriding and reimplementing a lot of code, which is a bit annoying, maintenance wise.

Take this extended transport for example: https://gist.github.com/ndm2/2426342a8f4685d6c26e

It implements persistent connections (something I'd like to suggest later on too), DSN features, access to responses and functionality to check for supported SMTP extensions. The changes in the overriden methods are rather small, but still they require to reimplement their parents whole code.

So in order to make this a little more extensibility friendly I'd like to suggest to refactor some of the code into overridable methods, and to expose responses.

ps. I'm a little unsure about the tests. Except for `getLastResponse()` and `_bufferResponseLines()` which have their own tests, all the other new methods are implicitly covered by the existing tests. Personally I tend to adding separate tests for every single method, and also tests that check whether the methods are being properly invoked, just to make sure everything's covered even when other tests are being changed. However I'm not sure about this projects conventions?