Documentation ¶
Overview ¶
Package smtpauth provides implementations of the smtp.Auth interface for sending messages with the LOGIN authentication mechanism, only allowed of SSL/TLS connections.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type LoginAuth ¶
type LoginAuth struct {
// contains filtered or unexported fields
}
LoginAuth is an Auth that implements the LOGIN authentication mechanism as defined in RFC 4616.
func (*LoginAuth) Next ¶
Next continues the authentication. The server has just sent the fromServer data. If more is true, the server expects a response, which Next should return as toServer; otherwise Next should return toServer == nil. If Next returns a non-nil error, the SMTP client aborts the authentication attempt and closes the connection.
func (*LoginAuth) Start ¶
Start begins an authentication with a server. It returns the name of the authentication protocol and optionally data to include in the initial AUTH message sent to the server. It can return proto == "" to indicate that the authentication should be skipped. If it returns a non-nil error, the SMTP client aborts the authentication attempt and closes the connection.