Introduce ExtractFields method.

This makes it posible, for instance, to customize TLS configuration when
connecting to smtp server.