email

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2023 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Email

type Email struct {
	From          string
	To            []string
	Subject       string
	PlainTextBody string
}

func (*Email) SMTPMessage

func (e *Email) SMTPMessage() string

Generates the message string that will be sent to the SMTP server

type Emailer

type Emailer func(*Email) error

func NewMockEmailer

func NewMockEmailer(w io.Writer, injectErr error) Emailer

func NewSMTPEmailer

func NewSMTPEmailer(config *SMTPEmailerConfig) Emailer

type SMTPEmailerConfig

type SMTPEmailerConfig struct {
	Host     string `json:"host"`
	Port     int    `json:"port"`
	Username string `json:"username"`
	Sender   string `json:"sender"`
	Password string `json:"password"`
}

func (*SMTPEmailerConfig) Validate

func (c *SMTPEmailerConfig) Validate() error

Jump to

Keyboard shortcuts

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