email

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DOMAIN = "github.com/aide-family/moon"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config interface {
	GetUser() string
	GetPass() string
	GetHost() string
	GetPort() uint32
}

type Email

type Email struct {
	// contains filtered or unexported fields
}

Email 邮件

func (*Email) Send

func (l *Email) Send() error

func (*Email) SetAttach

func (l *Email) SetAttach(attach ...string) Interface

func (*Email) SetBody

func (l *Email) SetBody(body string, contentType ...string) Interface

func (*Email) SetCc

func (l *Email) SetCc(cc ...string) Interface

func (*Email) SetSubject

func (l *Email) SetSubject(subject string) Interface

func (*Email) SetTo

func (l *Email) SetTo(to ...string) Interface

type Interface

type Interface interface {
	// Send 发送邮件
	Send() error
	SetTo(to ...string) Interface
	SetSubject(subject string) Interface
	SetBody(body string, contentType ...string) Interface
	SetAttach(attach ...string) Interface
	SetCc(cc ...string) Interface
}

func New

func New(cfg Config) Interface

Jump to

Keyboard shortcuts

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