email

package
v0.1.23 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EmailAccount

type EmailAccount struct {
	SMTPOption
	// contains filtered or unexported fields
}

EmailAccount smtp client

func NewAccount

func NewAccount(opt SMTPOption) (*EmailAccount, error)

NewAccount new smtp client

func (*EmailAccount) SendHTML

func (a *EmailAccount) SendHTML(title, body string, sendTo ...string) error

SendHTML 发送HTML内容

type SMTPOption

type SMTPOption struct {
	Addr     string `yaml:"addr"`
	Username string `yaml:"username"`
	Password string `yaml:"password"`
	Nickname string `yaml:"nickname"`
}

SMTPOption 发邮件参数

func (*SMTPOption) FromSettings

func (opt *SMTPOption) FromSettings(sets []*settings.SettingItem) error

FromSettings 从数据库加载

func (SMTPOption) SettingGroupKeys

func (opt SMTPOption) SettingGroupKeys() (string, []string)

SettingGroupKeys .

func (SMTPOption) ToSettings

func (opt SMTPOption) ToSettings() []*settings.SettingItem

ToSettings 转换为数据库配置项

func (SMTPOption) Validity

func (opt SMTPOption) Validity() error

Validity 检查合法性

Jump to

Keyboard shortcuts

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