Documentation ¶
Index ¶
Constants ¶
View Source
const ( ErrorParamEmpty liberr.CodeError = iota + liberr.MinPkgSMTP ErrorSMTPDial ErrorSMTPClientInit ErrorSMTPClientStartTLS ErrorSMTPClientAuth ErrorSMTPClientNoop ErrorSMTPClientMail ErrorSMTPClientRcpt ErrorSMTPClientData ErrorSMTPClientWrite ErrorSMTPLineCRLF )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SMTP ¶
type SMTP interface { Clone() SMTP Close() UpdConfig(cfg smtpcf.SMTP, tslConfig *tls.Config) Client(ctx context.Context) (*smtp.Client, error) Check(ctx context.Context) error Send(ctx context.Context, from string, to []string, data io.WriterTo) error Monitor(ctx libctx.FuncContext, vrs libver.Version) (montps.Monitor, error) }
func New ¶ added in v1.10.0
New return a SMTP interface to operation negotiation with a SMTP server. the dsn parameter must be string like this '[user[:password]@][net[(addr)]]/tlsmode[?param1=value1¶mN=valueN]".
- params available are : ServerName (string), SkipVerify (boolean).
- tls mode acceptable are : starttls, tls, <any other value to no tls/startls>.
- net acceptable are : tcp4, tcp6, unix.
Click to show internal directories.
Click to hide internal directories.