email

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CONTENT_TYPE_HTML = "Content-Type: text/html; charset=UTF-8"
	CONTENT_TYPE_TEXT = "Content-Type: text/plain; charset=UTF-8"

	A_LEVEL_DEBUG   = "debug"
	A_LEVEL_WARM    = "warm"
	A_LEVEL_ERROR   = "error"
	A_LEVEL_SUCCESS = "success"
	A_LEVEL_INFO    = "info"
)

Variables

View Source
var (
	ERR_NO_SEND_LIST = errors.New("no found send list")
)

Functions

func LoginAuth

func LoginAuth(username, password string) smtp.Auth

func SendMail

func SendMail(account Account, title, body string, send_to ...string) error

func SetContent

func SetContent(content string) []byte

Types

type Account

type Account struct {
	Username string
	Nickname string
	Password string
	Host     string

	Auth smtp.Auth
}

func NewAccount

func NewAccount(user, nick, passwd, host string, auth ...smtp.Auth) *Account

func (*Account) CRAMMD5Auth

func (a *Account) CRAMMD5Auth(secret string) smtp.Auth

func (*Account) LoginAuth

func (a *Account) LoginAuth() smtp.Auth

func (*Account) PlainAuth

func (a *Account) PlainAuth() smtp.Auth

type Email

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

Jump to

Keyboard shortcuts

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