mail

package
v0.0.0-...-eb76b16 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CT_HTML  string = "text/html"
	CT_PLAIN string = "text/plain"
)

Variables

This section is empty.

Functions

func CreateSmtpAuthClient

func CreateSmtpAuthClient(auth string, user string, pass string) sasl.Client

Types

type Email

type Email struct {
	field.DefaultField `bson:",inline"`
	Meta               Meta
	From               Party
	To                 []Party
	Cc                 []Party
	Bcc                []Party
	Subject            string
	Message            string
}

type Mailgun

type Mailgun struct {
	Domain      string
	PrivateKey  string
	UseEuDomain bool
}

func (Mailgun) Send

func (m Mailgun) Send(e *Email) error

type Meta

type Meta struct {
	ContentType string
}

type Party

type Party struct {
	Name  string
	Email string
}

type Ses

type Ses struct {
	AwsAccessKeyId     string
	AwsSecretAccessKey string
	Region             string
}

func (Ses) Send

func (s Ses) Send(e *Email) error

type Smtp

type Smtp struct {
	// contains filtered or unexported fields
}

func (Smtp) Send

func (s Smtp) Send(e *Email) error

type Transfer

type Transfer interface {
	Send(e *Email) error
}

func CreateTransfer

func CreateTransfer(config *conf.Config) (Transfer, error)

Jump to

Keyboard shortcuts

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