email

package
v0.0.0-...-20c7f3d Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SendEmail

func SendEmail(c context.Context, from, name string, to []string, subject, template string, params params.M) error

func ToContext

func ToContext(c Setter, worker EmailSender)

Types

type EmailSender

type EmailSender interface {
	SendEmail(from, name string, to []string, subject, template string, params params.M) error
}

func FromContext

func FromContext(c context.Context) EmailSender

type Setter

type Setter interface {
	Set(string, interface{})
}

type SmtpSender

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

func NewSmtpSender

func NewSmtpSender(server string, port int, user, password string) *SmtpSender

func (*SmtpSender) SendEmail

func (smtpSender *SmtpSender) SendEmail(from, name string, to []string, subject, templatePath string, params params.M) error

Jump to

Keyboard shortcuts

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