Added simple support for SSL/TLS to SMTP.

This simple change enables the use of SSL when using port 465 and TLS when using port 587 in the SMTP functionality. This allows the use of GMail as the SMTP gateway.
A more robust solution would be to add UI configuration for the SMTPSecure option.