The email
package supports ITRS Geneos specific EMail parameters as
documented in the official
libemail
🔗
but with additional support for TLS and Basic Authentication.
This package duplicates the original functionality in the cordial
libemail
library but for more general
use.
The Dial method accepts a config
object and returns a mail.Dialer
or an error.
The new parameters, which are case-insensitive, are:
-
_smtp_username
- no defaultIf set then authentication is attempted. The authentication methods supported are those supported by the Go
net/smtp
package. -
_smtp_password
- no defaultThe password is only used if
_smtp_username
is defined. It should be stored encrypted using the "expandable" format created usinggeneos aes password
program -
_smtp_tls
- defaultdefault
Can be one of
default
,force
ornone
(case insensitive).default
is to try TLS but fall back to plain text depending on the SMTP server.force
require TLS or will fail whilenone
does not try to establish a secure session and may be rejected by modern mail servers.