mailer

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mailer

type Mailer struct {
	Domain      string
	Templates   string
	Host        string
	Port        int
	Username    string
	Password    string
	Encryption  string
	FromAddress string
	FromName    string
	Jobs        chan Message
	Results     chan Result
	API         string
	ApiKey      string
	ApiUrl      string
}

func (*Mailer) ListenForMessage

func (m *Mailer) ListenForMessage()

func (*Mailer) SelectAPI

func (m *Mailer) SelectAPI(msg Message) error

func (*Mailer) SelectAPIDriver

func (m *Mailer) SelectAPIDriver(transport string, config mail.Config) (mail.Mailer, error)

func (*Mailer) Send

func (m *Mailer) Send(msg Message) error

func (*Mailer) SendViaAPI

func (m *Mailer) SendViaAPI(msg Message, transport string) error

func (*Mailer) SentSMTPMessage

func (m *Mailer) SentSMTPMessage(msg Message) error

type Message

type Message struct {
	From           string
	FromName       string
	To             string
	BCC            []string
	CC             []string
	Subject        string
	Template       string
	TemplateFormat TemplateFormat
	Attachments    []string
	Data           interface{}
}

type Result

type Result struct {
	Success bool
	Error   error
}

type TemplateFormat

type TemplateFormat string
const (
	HTMLTemplateFormat      TemplateFormat = "html"
	PlainTextTemplateFormat TemplateFormat = "plain/text"
)

Jump to

Keyboard shortcuts

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