Rewrite of SendMail function

The SendMail function is rewritten and has the following new functionality:
 - It is optional to skip verification of keys. The config option SKIP_VERIFY is added
 - If the port is 465, or ending on 465, the TLS(/SSL) connection is started first.
Merge pull request #761 from phsmit/mailer_rewritten

Rewrite of SendMail function