mailer

package
v0.0.0-...-9d184c9 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mailer

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

func New

func New(smtp SMTP) (Mailer, error)

func (*Mailer) Send

func (m *Mailer) Send(recipient, templateFile string, data any) error

type SMTP

type SMTP struct {
	Host     string `env:"SMTP_HOST,default=smtp.mailtrap.io"`
	Username string `env:"SMTP_USERNAME"`
	Password string `env:"SMTP_PASSWORD"`
	Sender   string `env:"SMTP_SENDER,default=Test <no-reply@testdomain.com>"`
	Port     int    `env:"SMTP_PORT,default=25"`
	Test     bool
}

Jump to

Keyboard shortcuts

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