email

package
v0.0.0-...-ccdf126 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2016 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dial

func Dial(addr string) (*smtp.Client, error)

return a smtp client

func SendMailUsingTLS

func SendMailUsingTLS(addr string, auth smtp.Auth, from string,
	to []string, msg []byte) (err error)

参考net/smtp的func SendMail() 使用net.Dial连接tls(ssl)端口时,smtp.NewClient()会卡住且不提示err len(to)>1时,to[1]开始提示是密送

Types

type Smtp

type Smtp struct {
	Host     string
	Port     string
	Username string
	Password string
	TLS      bool
	From     string
}

func (*Smtp) Send

func (me *Smtp) Send(to string, title, content string) error

func (*Smtp) String

func (me *Smtp) String() string

type SmtpEngine

type SmtpEngine interface {
	Send(to string, title, content string) error
}

type Smtps

type Smtps []*Smtp

func (Smtps) Send

func (me Smtps) Send(to string, title, content string) error

Jump to

Keyboard shortcuts

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