smtp

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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]开始提示是密送

func TlsDial

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

return a smtp client

Types

type SmtpHelper

type SmtpHelper struct {
	UserName string `json:"username" xml:"username" form:"username"`
	PassWord string `json:"password" xml:"password" form:"password"`
	HostName string `json:"hostname" xml:"hostname" form:"hostname"`
	To       string `json:"sendto" xml:"sendto" form:"sendto"`
	Cc       string `json:"cc" xml:"cc" form:"cc"`
	Bcc      string `json:"bcc" xml:"bcc" form:"bcc"`
	Subject  string `json:"subject" xml:"subject" form:"subject"`
	Body     string `json:"body" xml:"body" form:"body"`
	IsHtml   bool   `json:"ishtml" xml:"ishtml" form:"ishtml"`
}

func (*SmtpHelper) SendMail

func (helper *SmtpHelper) SendMail() error

func (*SmtpHelper) SendMailTls

func (helper *SmtpHelper) SendMailTls() error

Jump to

Keyboard shortcuts

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