Documentation ¶
Index ¶
Constants ¶
View Source
const ( ErrorParamsEmpty errors.CodeError = iota + errors.MinPkgSMTP ErrorConfigInvalidDSN ErrorConfigInvalidNetwork ErrorConfigInvalidParams ErrorConfigInvalidHost ErrorSMTPDial ErrorSMTPClientInit ErrorSMTPClientStartTLS ErrorSMTPClientAuth ErrorSMTPClientNoop ErrorSMTPClientMail ErrorSMTPClientRcpt ErrorSMTPClientData ErrorSMTPClientWrite ErrorSMTPLineCRLF )
Variables ¶
This section is empty.
Functions ¶
func IsCodeError ¶
func IsCodeError() bool
Types ¶
type Config ¶ added in v1.5.4
type Config interface { SetHost(host string) GetHost() string SetPort(port int) GetPort() int SetUser(user string) GetUser() string SetPass(pass string) GetPass() string SetNet(mode NETMode) GetNet() NETMode SetTls(mode TLSMode) GetTls() TLSMode ForceTLSSkipVerify(skip bool) IsTLSSkipVerify() bool SetTLSServerName(serverName string) GetTlSServerName() string GetDsn() string }
type ConfigModel ¶ added in v1.8.1
type SMTP ¶
type SMTP interface { Client(ctx context.Context) (*smtp.Client, errors.Error) Close() Check(ctx context.Context) errors.Error Clone() SMTP Send(ctx context.Context, from string, to []string, data io.WriterTo) errors.Error }
func NewSMTP ¶
NewSMTP 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 aceeptable are : tcp4, tcp6, unix.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.