mailer

package
v1.4.4 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitMailer

func InitMailer(m *Mailer)

func LoginAuth

func LoginAuth(username, password string) smtp.Auth

SMTP AUTH LOGIN Auth Handler

func Send

func Send(msg *Message)

func SendMail

func SendMail(to []string, subject, content string) error

Types

type Mailer

type Mailer struct {
	QueueLength       int
	SubjectPrefix     string
	Host              string
	From              string
	FromEmail         string
	User, Passwd      string
	DisableHelo       bool
	HeloHostname      string
	SkipVerify        bool
	UseCertificate    bool
	CertFile, KeyFile string
	UsePlainText      bool
	HookMode          bool
}
var (
	MailConfig *Mailer
)

type Message

type Message struct {
	*gomail.Message
	Info string
	// contains filtered or unexported fields
}

func NewMessage

func NewMessage(to []string, subject, htmlBody string) *Message

func NewMessageFrom

func NewMessageFrom(to []string, from, subject, htmlBody string) *Message

type Sender

type Sender struct {
}

func (*Sender) Send

func (s *Sender) Send(from string, to []string, msg io.WriterTo) error

Jump to

Keyboard shortcuts

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