mail

package
v0.0.0-...-de221d8 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Address     string `envconfig:"SMTP_ADDRESS"`
	Username    string `envconfig:"SMTP_USERNAME"`
	Password    string `envconfig:"SMTP_PASSWORD"`
	DefaultFrom string `envconfig:"SMTP_DEFAULT_FROM" default:"goway382@gmail.com"`
}

func LoadConfigFromEnv

func LoadConfigFromEnv() *Config

type Email

type Email struct {
	From        string
	To          []string
	CC          []string
	Subject     string
	Body        string
	Attachments []string
	Template    string
}

type Mailer

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

func New

func New(conf *Config) (*Mailer, error)

func (*Mailer) Send

func (m *Mailer) Send(email *Email) error

Jump to

Keyboard shortcuts

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