Documentation ¶
Index ¶
Constants ¶
View Source
const ( Plain = "PLAIN" Login = "LOGIN" )
Variables ¶
View Source
var AuthTypes = []string{Plain, Login}
Functions ¶
func NewProvider ¶
NewProvider creates a new SMTP authentication provider.
Types ¶
type Config ¶
type Config struct { Auth string Host string Port int AllowedDomains string TLS bool `ini:"tls"` SkipVerify bool }
Config contains configuration for SMTP authentication.
⚠️ WARNING: Change to the field name must preserve the INI key name for backward compatibility.
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider contains configuration of an SMTP authentication provider.
func (*Provider) Authenticate ¶
func (p *Provider) Authenticate(login, password string) (*auth.ExternalAccount, error)
Authenticate queries if login/password is valid against the SMTP server, and returns queried information when succeeded.
func (*Provider) SkipTLSVerify ¶
Click to show internal directories.
Click to hide internal directories.