Documentation ¶
Overview ¶
Sendcloud client in Go.
Index ¶
Constants ¶
View Source
const (
API_ENDPOINT = "https://sendcloud.sohu.com/webapi/"
)
Variables ¶
View Source
var ( ErrMethodNotAllowed = fmt.Errorf("method not allowed") ErrBadSignature = fmt.Errorf("bad signature") ErrInvalidTimestamp = fmt.Errorf("invalid timestamp") ErrInvalidForm = fmt.Errorf("invalid form data") )
View Source
var EMAIL_DOMAIN_RE = regexp.MustCompile(`[^<>]+<?.+@([^<>]+)>?`)
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) SendTemplate ¶
func (c *Client) SendTemplate(templateName string, subject string, from string, fromName string, substitutionVars *Substitution) (err error)
使用WebAPI发送模板 substitutionVars里面的To的长度应该和Sub下每一个value的长度一致
type Substitution ¶
邮件模板替换参数
Click to show internal directories.
Click to hide internal directories.