email

package
v0.0.0-...-5b4c5eb Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Email

type Email struct {
	From         *mail.Address
	Tos          []*mail.Address
	Subject      string
	BodyMIMEType string
	Body         io.Reader
	// contains filtered or unexported fields
}

func NewEmail

func NewEmail() *Email

func NewEmailsFromTemplate

func NewEmailsFromTemplate(t *Template, data []interface{}) ([]*Email, error)

func NewFromTemplate

func NewFromTemplate(t *Template, data interface{}) (*Email, error)

NewFromTemplate create Email from Template with given data. Return an error if

  • Parsing template fails

func (*Email) BodyString

func (e *Email) BodyString() string

func (*Email) CustomArgs

func (e *Email) CustomArgs() map[string]string

func (*Email) SetCustomArg

func (e *Email) SetCustomArg(key, value string)

type Template

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

func NewTemplate

func NewTemplate(name string, value string) *Template

func (*Template) Execute

func (t *Template) Execute(data interface{}) error

func (*Template) Parse

func (t *Template) Parse() error

Jump to

Keyboard shortcuts

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