SMTP transport - Extensibility and response access

This is the 2.x implementation of #3013