Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsEmailFormat ¶
func SmtpSendEmail ¶
func SmtpSendEmail(req *SmtpRequest) (err error)
Types ¶
type SmtpRequest ¶
type SmtpRequest struct { SmtpHost string SmtpPort int SmtpUsername string //also as stmp username SmtpPassword string From string To []string Subject string Message string Socks4aProxyAddr string }
func NewSmtpRequestFromGmail ¶
func NewSmtpRequestFromGmail(gmail string, password string) *SmtpRequest
从gmail发送邮件
req := kmgEmail.NewSmtpRequestFromGmail("xxxx@gmail.com", "xxxx") req.To = []string{"xxxx@gmail.com"} req.Subject = "测试邮件标题2" req.Message = "<p>测试邮件内容2</p>" req.Socks4aProxyAddr = "127.0.0.1:20000" return kmgEmail.SmtpSendEmail(req)
Click to show internal directories.
Click to hide internal directories.