email

package
v0.0.0-...-b0f0a3b Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NewSenderOptions

type NewSenderOptions struct {
	BaseURL                   string
	EndpointURL               string
	Log                       *log.Logger
	MarketingEmailAddress     string
	MarketingEmailName        string
	Metrics                   *prometheus.Registry
	ReplyToEmailName          string
	ReplyToEmailAddress       string
	Token                     string
	TransactionalEmailAddress string
	TransactionalEmailName    string
}

type Sender

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

Sender can send transactional and marketing emails through Postmark. See https://postmarkapp.com/developer

func NewSender

func NewSender(opts NewSenderOptions) *Sender

func (*Sender) SendGenericEmail

func (s *Sender) SendGenericEmail(ctx context.Context, name string, email model.Email, subject, preheader, content string) error

func (*Sender) SendLoginEmail

func (s *Sender) SendLoginEmail(ctx context.Context, name string, email model.Email, token string) error

func (*Sender) SendSignupEmail

func (s *Sender) SendSignupEmail(ctx context.Context, name string, email model.Email, token string) error

Jump to

Keyboard shortcuts

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