email

package
v0.0.0-...-4a78be1 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2019 License: GPL-3.0 Imports: 5 Imported by: 0

README

email

请求URL

  • http://ip:port/sender/mail

请求方式:

  • POST

请求头

参数名 是否必须 类型 说明
Content-Type string 请求类型:application/x-www-form-urlencoded||application/json

请求参数

参数名 是否必须 类型 说明
from string 发件人,必须xxx@staff.qkagame.com格式
to string 收件人地址,多个收件人用(,)分隔
subject string 邮件标题
content string 邮件内容
content_type string htmlortxt 默认txt

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoginAuth

func LoginAuth(username, password string) smtp.Auth

LoginAuth return a implemented by smtp.Auth of LOGIN mechanism

Types

type SMTP

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

SMTP smtp auth info

func New

func New(address, username, password, authtype string) *SMTP

New return *SMTP

func (*SMTP) SendMail

func (s *SMTP) SendMail(from string, to []string, subject, body, contentType string) error

SendMail sent the email with args

Jump to

Keyboard shortcuts

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