email

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterMailer added in v0.10.2

func RegisterMailer[T kernel.KernelConfig](ctx context.Context) error

Types

type Config

type Config interface {
	Mailer() Mailer
}

type MailConfiger added in v0.10.2

type MailConfiger interface {
	MailConfig() Config
}

type Mailer

type Mailer interface {
	Mail(*Message) error
}

type Message

type Message struct {
	To       []string
	Subject  string
	HTMLBody string
}

type SMTPConfig

type SMTPConfig struct {
	From     string
	Host     string
	Port     int
	Username string
	Password string
}

func (*SMTPConfig) Mailer

func (c *SMTPConfig) Mailer() Mailer

type SMTPMailer

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

func NewSMTPMailer

func NewSMTPMailer(host string, port int, username, password, from string) *SMTPMailer

func (*SMTPMailer) Mail

func (s *SMTPMailer) Mail(m *Message) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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