email

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEmailNotify

func NewEmailNotify(url, username, password string, port int) notify.Notifier[Email]

NewEmailNotify 构造函数

Types

type Builder

type Builder interface {
	Build() (Email, error)
	SetToForm(form []string) Builder
	SetToUser(to string) Builder
	SetToSubject(subject string) Builder
	SetToBody(name string, data interface{}) Builder
	SetToContentType(ContextType ContextType) Builder
}

func NewEmailBuilder

func NewEmailBuilder(tmpl *template.Template) Builder

type ContextType

type ContextType string
const (
	TEXT ContextType = "text/plain"
	HTML ContextType = "text/html"
)

type Email

type Email struct {
	From        string
	To          []string
	Subject     string
	ContentType string
	Body        string
	Error       error
}

func (Email) Message

func (m Email) Message() (Email, error)

type Notifier

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

func (*Notifier) Send

Send 发送邮件

Jump to

Keyboard shortcuts

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