messaging

package
v0.0.0-...-83625b3 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MessageSender

type MessageSender interface {
	Send(msgtype string, target MessageTarget, data interface{}) error
}

type MessageTarget

type MessageTarget interface {
	Address() string
}

type SMTPMessageSender

type SMTPMessageSender struct {
	SendMail func(string, smtp.Auth, string, []string, []byte) error
	// contains filtered or unexported fields
}

func NewSMTPMessageSender

func NewSMTPMessageSender(from, serverAddr string, smtpAuth smtp.Auth) *SMTPMessageSender

func (*SMTPMessageSender) AddTemplate

func (s *SMTPMessageSender) AddTemplate(tpl *template.Template) *SMTPMessageSender

func (*SMTPMessageSender) Send

func (s *SMTPMessageSender) Send(msgtype string, target MessageTarget, data interface{}) error

Jump to

Keyboard shortcuts

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