Adding check for a valid encryption context to MailerFactory.
Fixing support for SMTP encryption.

Closes #614
Closes #619