mailer

package
v1.5.12 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrorParamsEmpty errors.CodeError = iota + errors.MIN_PKG_Mailer
	ErrorMailerHtml
	ErrorMailerText
)

Variables

This section is empty.

Functions

func IsCodeError

func IsCodeError() bool

Types

type Mailer

type Mailer interface {
	SetTheme(t Themes)
	GetTheme() Themes

	SetTextDirection(d TextDirection)
	GetTextDirection() TextDirection

	SetBody(b *hermes.Body)
	GetBody() *hermes.Body

	SetCSSInline(disable bool)

	SetName(name string)
	GetName() string

	SetCopyright(copy string)
	GetCopyright() string

	SetLink(link string)
	GetLink() string


	SetTroubleText(text string)
	GetTroubleText() string

	GenerateHTML() (*bytes.Buffer, liberr.Error)
	GeneratePlainText() (*bytes.Buffer, liberr.Error)
}

func New

func New() Mailer

type TextDirection

type TextDirection uint8
const (
	LeftToRight TextDirection = iota
	RightToLeft
)

func ParseTextDirection

func ParseTextDirection(direction string) TextDirection

func (TextDirection) String

func (d TextDirection) String() string

type Themes

type Themes uint8
const (
	ThemeDefault Themes = iota
	ThemeFlat
)

func ParseTheme

func ParseTheme(theme string) Themes

func (Themes) String

func (t Themes) String() string

Jump to

Keyboard shortcuts

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