mailer

package
v0.0.0-...-038b5da Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Template = map[string]templateItem{
	"code": {
		Id:           "xxxx-xxxxx",
		Subject:      "Verification code",
		HTMLTemplate: `<p>Your verification code is <strong>{{.code}}</strong>.</p>`,
		TextTemplate: `Your verification code is {{.code}}.`,
	},
}

Functions

This section is empty.

Types

type Address

type Address struct {
	Name  string
	Email string
}

type Email

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

func New

func New(template templateItem, data map[string]any) Email

func (Email) SendTo

func (e Email) SendTo(ctx context.Context, name, email string) error

type Message

type Message struct {
	From       Address
	To         Address
	Subject    string
	TemplateID string
	Data       map[string]any
	HTMLBody   string
	TextBody   string
}

type Provider

type Provider interface {
	Send(ctx context.Context, msg Message) error
}

Jump to

Keyboard shortcuts

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