inform

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2025 License: BSD-3-Clause Imports: 13 Imported by: 4 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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