mailer

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dummy

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

func NewDummy

func NewDummy() *Dummy

func (*Dummy) LastMessage

func (d *Dummy) LastMessage() *MailLog

func (*Dummy) SendMail

func (d *Dummy) SendMail(to, subject, body string) (*Response, error)

type MailLog

type MailLog struct {
	To      string
	Subject string
	Body    string
}

type Mailer

type Mailer interface {
	SendMail(to, subject, body string) (*Response, error)
}

func NewSendGrid

func NewSendGrid(apiKey, fromName, fromMail string) Mailer

type Response

type Response struct {
	StatusCode int
	Body       string
}

type SendGrid

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

func (*SendGrid) SendMail

func (s *SendGrid) SendMail(to, subject, body string) (*Response, error)

Jump to

Keyboard shortcuts

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