Sendcloud 邮件 API 的 Go 封装 Go Sendcloud

码农软件 · 软件分类 · 网络工具包 · 2019-02-24 21:59:46

软件介绍

这是一个 Sendcloud 邮件发送服务的 Go 语言封装包,可利用它在 Go 程序中通过 Sendcloud 发送邮件。

SendCloud 发送邮件 API 的封装,现已将 API 接口切换到了 v2 版本,如果想使用 v1 版本的 API,请 Checkout v1 Tag。

v2 版本新功能:

  • 1、模板管理(添加、删除、更新、获取)

  • 2、地址列表管理(添加、删除、更新、获取)

  • 3、地址列表成员管理(添加、删除、更新、获取)

  • 4、邮件发送(模板发送、地址列表发送、附件支持)

使用方法如下:

设置 API 信息:

UpdateApiInfo("api_user", "api_key")

发送邮件:

var to = make([]map[string]string, 1)
to[0] = map[string]string{"to":"917996695@qq.com", "%url%": "http://www.baidu.com"}
var ok, err, result = SendTemplateMail("template name", "from mail", "from name", "replay to email address", "subject", to, nil)

返回数据说明:

ok     发送是否成功
err    错误信息
result 接口返回的 json 数据

本文地址:https://www.codercto.com/soft/d/64.html

Software Engineering for Internet Applications

Software Engineering for Internet Applications

Eve Andersson、Philip Greenspun、Andrew Grumet / The MIT Press / 2006-03-06 / USD 35.00

After completing this self-contained course on server-based Internet applications software, students who start with only the knowledge of how to write and debug a computer program will have learned ho......一起来看看 《Software Engineering for Internet Applications》 这本书的介绍吧!

MD5 加密
MD5 加密

MD5 加密工具

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具