email

package
v0.0.0-...-055f2dd Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrImpossibleReadFile  = errors.New("impossible to read the template file")
	ErrImpossibleParseFile = errors.New("impossible to parse the template file")
)

Errors

Functions

This section is empty.

Types

type Email

type Email struct {
	From         string `json:"from"`
	UserID       uint   `json:"user_id,omitempty"`
	Addr         string `json:"addr"`
	Subject      string `json:"subject"`
	Body         string `json:"body"`
	TempPassword string `json:"temp_password"`
	BaseURL      string `json:"base_url"`
	Template     string `json:"template"`
}

Email contains data to build and send emails

func ChangePassword

func ChangePassword(addr string, tpass string) Email

ChangePassword returns a Email with settings to change password

func NewUser

func NewUser(uid uint, addr string, tpass string) Email

NewUser returns a Email with settings to new user

func (Email) Send

func (e Email) Send() error

Send send a Email

Jump to

Keyboard shortcuts

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