sender

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EmailCredentials

type EmailCredentials struct {
	Server   string
	Port     int
	From     string
	FromName string
	Pass     string
	Timeout  time.Duration
}

type Event

type Event int
const (
	ConfirmationEvent Event = iota
	PasswordRecoveryEvent
)

func (Event) String

func (e Event) String() string

type Messages

type Messages map[Event]string

type Sender

type Sender interface {
	Send(event Event, recipient string, message string) error
}

func NewDefaultEmailSender

func NewDefaultEmailSender(cr EmailCredentials, sj Subjects, m Messages) (Sender, error)

NewDefaultEmailSender return Sender Argument 'Messages' should be exists '%s' symbols for use substring to wrap your dynamic message

type Subjects

type Subjects map[Event]string

Jump to

Keyboard shortcuts

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