mail

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2023 License: CC0-1.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MailConfig added in v0.2.11

type MailConfig struct {
	Sender        string
	EmailUsername string
	EmailPassword string
	SecretKey     string
	EmailFrom     string
	FromName      string
	Host          string
	Port          int
}

type Mandrill added in v0.2.11

type Mandrill struct {
	*MailConfig
	// contains filtered or unexported fields
}

func (*Mandrill) AddAttachment added in v0.2.12

func (m *Mandrill) AddAttachment(attachment *mandrill.Attachment) Mandrills

func (*Mandrill) AddRecipient added in v0.2.11

func (m *Mandrill) AddRecipient(recipientEmail, recipientName string) Mandrills

func (*Mandrill) Send added in v0.2.11

func (m *Mandrill) Send() error

func (*Mandrill) SetEmailFrom added in v0.5.20

func (m *Mandrill) SetEmailFrom(emailFrom string) Mandrills

func (*Mandrill) SetFromName added in v0.5.20

func (m *Mandrill) SetFromName(fromName string) Mandrills

func (*Mandrill) SetGlobalMergeVars added in v0.2.13

func (m *Mandrill) SetGlobalMergeVars(data map[string]interface{}) Mandrills

func (*Mandrill) SetHTMLContent added in v0.2.11

func (m *Mandrill) SetHTMLContent(subject, htmlContent string) Mandrills

func (*Mandrill) SetTemplate added in v0.2.13

func (m *Mandrill) SetTemplate(templateName string, templateContent map[string]string) Mandrills

func (*Mandrill) SetTextContent added in v0.2.11

func (m *Mandrill) SetTextContent(subject, textContent string) Mandrills

type Mandrills added in v0.2.11

type Mandrills interface {
	AddRecipient(recipientEmail, recipientName string) Mandrills
	AddAttachment(attachment *mandrill.Attachment) Mandrills
	SetHTMLContent(subject, htmlContent string) Mandrills
	SetTextContent(subject, textContent string) Mandrills
	SetGlobalMergeVars(data map[string]interface{}) Mandrills
	SetTemplate(templateName string, templateContent map[string]string) Mandrills
	SetEmailFrom(emailFrom string) Mandrills
	SetFromName(fromName string) Mandrills
	Send() error
}

func NewMandrill added in v0.2.11

func NewMandrill(opts *MailConfig) Mandrills

type SMTP

type SMTP struct {
	SMTPConfig
	// contains filtered or unexported fields
}

func (*SMTP) AddRecipient added in v0.2.10

func (s *SMTP) AddRecipient(recipient string) SMTPs

func (*SMTP) Send

func (s *SMTP) Send() error

func (*SMTP) SetContent

func (s *SMTP) SetContent(subject, message string) SMTPs

type SMTPConfig

type SMTPConfig struct {
	MailConfig
	// contains filtered or unexported fields
}

type SMTPs

type SMTPs interface {
	AddRecipient(recipient string) SMTPs
	SetContent(subject, message string) SMTPs
	Send() error
}

func NewSMTP

func NewSMTP(cfg *SMTPConfig) SMTPs

Jump to

Keyboard shortcuts

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