mail

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrMailAddrCannotEmpty mail server addresses cannot empty
	ErrMailAddrCannotEmpty = errors.New("addresses cannot be empty")
	// ErrMailUserCannotEmpty username cannot empty
	ErrMailUserCannotEmpty = errors.New("username cannot empty")
	// ErrMailPasswordCannotEmpty password cannot empaty
	ErrMailPasswordCannotEmpty = errors.New("password cannot empaty")
	// ErrMailPortCannotEmpty port cannot empty
	ErrMailPortCannotEmpty = errors.New("port cannot empty")
)

Functions

This section is empty.

Types

type MailServer

type MailServer struct {
	Addr     string
	Port     int
	Username string
	Password string
}

MailServer 邮件服务器配置信息

func New

func New(username, password, addr string, port int) *MailServer

func (*MailServer) Send

func (m *MailServer) Send(subject, body string, attach, to []string) error

Send 发送普通文本、携带附件、HTML邮件

Jump to

Keyboard shortcuts

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