smtp

package
v0.0.0-...-8d41f68 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 9, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const OAuthBearer = "XOAUTH2"

The XAUTH2 mechanism name.

Variables

This section is empty.

Functions

func NewOAuthBearerClient

func NewOAuthBearerClient(opt *OAuthBearerOptions) sasl.Client

An implementation of the OAUTHBEARER authentication mechanism, as described in RFC 7628.

func Send

func Send(ctx context.Context, cfg *config.Config, svc string, recipients []string, body io.Reader) error

Send sends an email.

Types

type OAuthBearerError

type OAuthBearerError struct {
	Status  string `json:"status"`
	Schemes string `json:"schemes"`
	Scope   string `json:"scope"`
}

func (*OAuthBearerError) Error

func (err *OAuthBearerError) Error() string

Implements error

type OAuthBearerOptions

type OAuthBearerOptions struct {
	Username    string
	AccessToken string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL