email

package
v2.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2026 License: Apache-2.0 Imports: 10 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

func SendMailTask

func SendMailTask(ctx context.Context, message *Message, dialer *Dialer, opt ...OptionFunc) error

func Verify

func Verify(email string) error

Types

type Dialer

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

func NewDefaultDialer

func NewDefaultDialer() *Dialer

func NewDialer

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

type Message

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

func NewMessage

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