email

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SendMail

func SendMail(message *Message, dialer *Dialer, opt ...OptionFunc) error

Types

type Dialer added in v1.0.0

type Dialer struct {
	Host     string // smtp.xxx.com
	Port     int    // 端口号
	UserName string // 发信账号
	Password string // 发信密码
	FromName string // 发信人名称
}

func NewDefaultDialer added in v1.0.0

func NewDefaultDialer() *Dialer

func NewDialer added in v1.0.0

func NewDialer(host string, port int, username, password string) *Dialer

type Message added in v1.0.0

type Message struct {
	To      []string // 收件人
	Subject string   // 邮件主题
	Body    string   // 邮件正文
}

func NewMessage added in v1.0.0

func NewMessage(to []string, subject, body string) *Message

type OptionFunc

type OptionFunc func(msg *gomail.Message)

Jump to

Keyboard shortcuts

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