inform

package
v1.3.71 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2023 License: BSD-3-Clause Imports: 13 Imported by: 2

Documentation

Index

Constants

View Source
const (
	//SMTPNoAuth login using no authentication
	SMTPNoAuth = "NO_AUTH"
	//SMTPPlain login using PLAIN authentication for google
	SMTPPlain = "PLAIN_AUTH"
	//SMTPLogin login using no authentication for other
	SMTPLogin = "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)

NewSimpleEmailMaker initiates simple email maker

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)

NewSimpleEmailSender initiates email sender

func (*SimpleEmailSender) Send

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

Send sends email

type TemplateEmailMaker added in v0.2.46

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

TemplateEmailMaker makes email from provided template file

func NewTemplateEmailMaker added in v0.2.46

func NewTemplateEmailMaker(c *viper.Viper) (*TemplateEmailMaker, error)

NewTemplateEmailMaker initiates new maker object

func (*TemplateEmailMaker) Make added in v0.2.46

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

Make prepares an email for data object

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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