Refactor code to support mail. Accepts authentication. Support SSL and
STARTTLS.

Issue #185