Add support of SMTP authentication

This patch adds support of SMTP authentication w/ or wo/ SSL or TLS.
This is broken if `smtpauth` is not `True` because in that case `smtpuser` and `smtppass` are both undefined.