Documentation ¶
Index ¶
- type Config
- type SMTP
- func (s *SMTP) AddressDesc() string
- func (s *SMTP) AddressName() string
- func (s *SMTP) ChannelDesc() string
- func (s *SMTP) ChannelName() string
- func (s *SMTP) ID() string
- func (s *SMTP) MaxAddressLen() int
- func (s *SMTP) MaxBodyLen() int
- func (s *SMTP) MaxOTPLen() int
- func (s *SMTP) Push(otp models.OTP, subject string, m []byte) error
- func (s *SMTP) ValidateAddress(to string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Host string `json:"host"` Port int `json:"port"` AuthProtocol string `json:"auth_protocol"` Username string `json:"username"` Password string `json:"password"` FromEmail string `json:"from_email"` Timeout time.Duration `json:"timeout"` MaxConns int `json:"max_conns"` // STARTTLS or TLS. TLSType string `json:"tls_type"` TLSSkipVerify bool `json:"tls_skip_verify"` }
Config represents an SMTP server's credentials.
type SMTP ¶
type SMTP struct {
// contains filtered or unexported fields
}
SMTP is a generic SMTP e-mail provider.
func (*SMTP) AddressDesc ¶
AddressDesc returns the help text that is shown to the end users when they're asked to enter their addresses (eg: e-mail or phone), if the OTP registered without an address.
func (*SMTP) AddressName ¶
AddressName returns the e-mail Provider's address name.
func (*SMTP) ChannelDesc ¶
ChannelDesc returns help text for the e-mail verification Provider.
func (*SMTP) ChannelName ¶
ChannelName returns the e-mail Provider's name.
func (*SMTP) MaxAddressLen ¶
MaxAddressLen returns the maximum allowed length of the e-mail address.
func (*SMTP) MaxBodyLen ¶
MaxBodyLen returns the max permitted body size.
func (*SMTP) ValidateAddress ¶
ValidateAddress "validates" an e-mail address.
Click to show internal directories.
Click to hide internal directories.