mailer

package
v0.0.0-...-8495beb Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2022 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build

func Build() fx.Option

Types

type Config

type Config struct {
	SendgridFromName string `envconfig:"SENDGRID_FROM_NAME" required:"true"`
	SendgridFromAddr string `envconfig:"SENDGRID_FROM_ADDR" required:"true"`
	SendgridAPIKey   string `envconfig:"SENDGRID_API_KEY" required:"true"`
}

type Mailer

type Mailer interface {
	Mail(toname, toaddr, subj, rich, text string) error
}

func NewSendGrid

func NewSendGrid() (Mailer, error)

type Mock

type Mock struct{}

func (*Mock) Mail

func (m *Mock) Mail(toname, toaddr, subj, rich, text string) error

type SendGrid

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

func (*SendGrid) Mail

func (m *SendGrid) Mail(toname, toaddr, subj, rich, text string) error

Jump to

Keyboard shortcuts

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