package
0.6.2
Repository: https://github.com/wneessen/go-mail.git
Documentation: pkg.go.dev

# Functions

CRAMMD5Auth returns an [Auth] that implements the CRAM-MD5 authentication mechanism as defined in RFC 2195.
Dial returns a new [Client] connected to an SMTP server at addr.
LoginAuth returns an [Auth] that implements the LOGIN authentication mechanism as it is used by MS Outlook.
NewClient returns a new [Client] using an existing connection and host as a server name to be used when authenticating.
PlainAuth returns an [Auth] that implements the PLAIN authentication mechanism as defined in RFC 4616.
ScramSHA1Auth creates and returns a new SCRAM-SHA-1 authentication mechanism with the given username and password.
ScramSHA1PlusAuth returns an Auth instance configured for SCRAM-SHA-1-PLUS authentication with the provided username, password, and TLS connection state.
ScramSHA256Auth creates and returns a new SCRAM-SHA-256 authentication mechanism with the given username and password.
ScramSHA256PlusAuth returns an Auth instance configured for SCRAM-SHA-256-PLUS authentication with the provided username, password, and TLS connection state.
SendMail connects to the server at addr, switches to TLS if possible, authenticates with the optional mechanism a if possible, and then sends an email from address from, to addresses to, with message msg.
XOAuth2Auth returns an [Auth] that implements the XOAuth2 authentication mechanism as defined in the following specs: https://developers.google.com/gmail/imap/xoauth2-protocol https://learn.microsoft.com/en-us/exchange/client-developer/legacy-protocols/how-to-authenticate-an-imap-pop-smtp-application-by-using-oauth.

# Variables

ErrNoConnection is returned when attempting to perform an operation that requires an established connection but none exists.
ErrNonTLSConnection is returned when an attempt is made to retrieve TLS state on a non-TLS connection.
ErrUnencrypted is an error indicating that the connection is not encrypted.
ErrUnexpectedServerChallange is an error indicating that the server issued an unexpected challenge.
ErrUnexpectedServerResponse is an error indicating that the server issued an unexpected response.
ErrWrongHostname is an error indicating that the provided hostname does not match the expected value.

# Structs

A Client represents a client connection to an SMTP server.
ServerInfo records information about an SMTP server.

# Interfaces

Auth is implemented by an SMTP authentication mechanism.