mail

package
v0.0.0-...-ef8624d Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithParam

func WithParam(key string, value any) func(params map[string]any)

func WithParams

func WithParams(in map[string]any) func(params map[string]any)

Types

type Mailer

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

func NewMailer

func NewMailer(cfg MailerConfig) (*Mailer, error)

func (*Mailer) SendToEmail

func (mailer *Mailer) SendToEmail(message, email string, wps ...func(params map[string]any)) error

func (*Mailer) SendToUser

func (mailer *Mailer) SendToUser(message string, user *entity.User, params map[string]any) error

type MailerConfig

type MailerConfig struct {
	Host     string `required:"true"`
	Port     int    `default:"1025"`
	Username string
	Password string
}

Jump to

Keyboard shortcuts

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