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 cordiallibemail 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 default
If set then authentication is attempted. The authentication methods
supported are those supported by the Go
net/smtp package.
_smtp_password - no default
The password is only used if _smtp_username is defined. It should
be stored encrypted using the "expandable" format created using geneos aes password program
_smtp_tls - default default
Can be one of default, force or none (case insensitive).
default is to try TLS but fall back to plain text depending on the
SMTP server. force require TLS or will fail while none does not
try to establish a secure session and may be rejected by modern mail
servers.
Dial sets up a Dialer using the Geneos _SMTP_* parameters
All the parameters in the official docs are supported and have the same
defaults
Additional parameters are
* _SMTP_TLS - default / force / none (case insensitive)
* _SMTP_USERNAME - if defined authentication attempted
* _SMTP_PASSWORD - password in [ExpandString] format
Envelope processes the Geneos libemail parameters for _FROM, _TO, _CC
and _BCC and their related parameters stored in conf and returns a
populated mail.Message structure or an error.