email

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2020 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TypeHTML .
	TypeHTML = "html"
)

Variables

View Source
var ErrWriteBusy = errors.New("write busy")

ErrWriteBusy tcp 發送緩衝區 已滿

Functions

func NewSMTPClient

func NewSMTPClient(host, user, pwd string) (c *smtp.Client, e error)

NewSMTPClient 創建一個 未加密 的 smtp 客戶端

func NewSMTPSSLClient

func NewSMTPSSLClient(host, user, pwd string) (c *smtp.Client, e error)

NewSMTPSSLClient 創建一個 使用 tls 的 smtp 客戶端

func SendEmail

func SendEmail(host,
	user, pwd, to,
	subject, body,
	mailtype string,
) (e error)

SendEmail 使用非 加密 發送 email

func SendSSLEmail

func SendSSLEmail(host,
	user, pwd, to,
	subject, body,
	mailtype string,
) (e error)

SendSSLEmail 使用 ssl 發送 email

Types

type InsecureAuth

type InsecureAuth struct {
	User, Pwd string
}

InsecureAuth 非加密的 email 驗證

func (*InsecureAuth) Next

func (*InsecureAuth) Next(fromServer []byte, more bool) ([]byte, error)

Next .

func (*InsecureAuth) Start

func (a *InsecureAuth) Start(server *smtp.ServerInfo) (string, []byte, error)

Start .

Jump to

Keyboard shortcuts

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