mail

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2024 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 Client

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

func NewClient

func NewClient(mailer Mailer, from string) *Client

func NewPostmarkClient

func NewPostmarkClient(serverToken string, from string) *Client

func (*Client) SendAccountVerificationMail

func (c *Client) SendAccountVerificationMail(ctx context.Context, to string, username string, verifyLink *url.URL) error

func (*Client) SendPasswordResetMail

func (c *Client) SendPasswordResetMail(ctx context.Context, to string, username string, resetLink *url.URL) error

type DebugLoggingMailer

type DebugLoggingMailer struct{}

DebugLoggingMailer is a Mailer implementation for local debugging. It never sends actual emails, but only logs the emails it is asked to send.

func (DebugLoggingMailer) SendEmail

type Mailer

type Mailer interface {
	SendEmail(ctx context.Context, email postmark.Email) (postmark.EmailResponse, error)
}

Mailer is the interface that clients needs to implement in order to fake out the real postmark client.

Jump to

Keyboard shortcuts

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