mailer

package
v0.0.0-...-8b20b1e Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SendMail

func SendMail(smtp pass.SMTP, to []string, subject, text string) (err error)

SendMail one simple mail.

func SetDevMail

func SetDevMail(mail string)

SetDevMail replaces the real mail adress by the given one, when using SendMail

Types

type JoinedFile

type JoinedFile struct {
	Content  []byte
	Filename string
}

JoinedFile is a file attached to the mail.

type Pool

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

Pool provides a faster way to send one email to multiple adresses.

func NewPool

func NewPool(credences pass.SMTP, pjs []JoinedFile) (Pool, error)

NewPool returns a new pool. `SendMail` should be called repeat repeatedly then `Close` once.

func (Pool) Close

func (p Pool) Close()

func (Pool) SendMail

func (p Pool) SendMail(to, subject, textBody string) error

Jump to

Keyboard shortcuts

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