inform

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2021 License: BSD-3-Clause Imports: 10 Imported by: 2

Documentation

Index

Constants

View Source
const (
	//SMTP_NOAUTH login using no authentication
	SMTP_NOAUTH = "NO_AUTH"
	//SMTP_PLAIN login using PLAIN authentication for google
	SMTP_PLAIN = "PLAIN_AUTH"
	//SMTP_LOGIN login using no authentication for other
	SMTP_LOGIN = "LOGIN"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data struct {
	ID      string
	MsgType string
	Email   string
	MsgTime time.Time
}

Data keeps data for email generation

type SimpleEmailMaker

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

SimpleEmailMaker makes email from config

func NewSimpleEmailMaker

func NewSimpleEmailMaker(c *viper.Viper) (*SimpleEmailMaker, error)

func (*SimpleEmailMaker) Make

func (maker *SimpleEmailMaker) Make(data *Data) (*email.Email, error)

Make prepares the email for ID

type SimpleEmailSender

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

SimpleEmailSender uses standard esmtp lib to send emails

func NewSimpleEmailSender

func NewSimpleEmailSender(c *viper.Viper) (*SimpleEmailSender, error)

func (*SimpleEmailSender) Send

func (s *SimpleEmailSender) Send(email *email.Email) error

Send sends email

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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