email

package
v0.108.0 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2023 License: Apache-2.0 Imports: 11 Imported by: 0 modules, 0 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

This section is empty.

Variables

View Source
var (
	ErrRateLimitExceeded     = errors.New("rate limit exceeded")
	ErrNoSMTPHostConfigured  = errors.New("no smtp host configured")
	ErrNoSenderConfigured    = errors.New("no sender configured")
	ErrNoRecipientConfigured = errors.New("no recipient configured")
	ErrSenderMisconfigured   = errors.New("sender misconfigured")
)

Functions

This section is empty.

Types

type DialAndSender

type DialAndSender interface {
	DialAndSend(m ...*gomail.Message) error
}

type Emailer

type Emailer struct {
	Params  Params
	Dialer  DialAndSender
	Limiter *rate.Limiter
}

func NewEmailer

func NewEmailer(p Params) (*Emailer, error)

func (*Emailer) SendEmail

func (e *Emailer) SendEmail(receivers []string, subject string, body string, attachmentFilePath []string) error

func (*Emailer) SendEmailWithLimit

func (e *Emailer) SendEmailWithLimit(receivers []string, subject string, body string, attachmentFilePath []string) error

func (*Emailer) SendInviteUserEmail

func (e *Emailer) SendInviteUserEmail(receivers []string, params map[string]string) error

func (*Emailer) SendResetPasswordEmail

func (e *Emailer) SendResetPasswordEmail(receivers []string, params map[string]string) error

type Params

type Params struct {
	SMTPHost           string
	SMTPPort           int
	UseSSL             bool
	Username           string
	Password           string
	LocalName          string
	Sender             string
	LimitEveryDuration time.Duration
	Burst              int
	LakefsBaseURL      string
}

type TemplateParams

type TemplateParams struct {
	URL string
}

Jump to

Keyboard shortcuts

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