Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/miaolz123/sendcloud
A SDK of sendcloud.net for Golang
https://github.com/miaolz123/sendcloud
Last synced: about 2 months ago
JSON representation
A SDK of sendcloud.net for Golang
- Host: GitHub
- URL: https://github.com/miaolz123/sendcloud
- Owner: miaolz123
- License: mit
- Created: 2016-07-29T06:28:37.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-08-01T08:54:34.000Z (over 8 years ago)
- Last Synced: 2024-06-20T10:14:21.312Z (7 months ago)
- Language: Go
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sendcloud [![GoDoc](https://godoc.org/github.com/miaolz123/sendcloud?status.svg)](https://godoc.org/github.com/miaolz123/sendcloud) [![Build Status](https://travis-ci.org/miaolz123/sendcloud.svg?branch=master)](https://travis-ci.org/miaolz123/sendcloud)
### A SDK of sendcloud.net for Golang
```go
package mainimport (
"log""github.com/miaolz123/sendcloud"
)// Please replace this section
const (
emailAPIUser = "balabala"
emailAPIKey = "balabalabalabala"
sendAddr = "GooGle Inc."
receiveAddr = "[email protected]"
)func main() {
conf := sendcloud.Config{
EmailAPIUser: emailAPIKey,
EmailAPIKey: emailAPIKey,
}
client := sendcloud.New(conf)
xs := sendcloud.XSmtpAPI{
To: []string{receiveAddr},
Sub: map[string][]string{
"%name%": []string{"TEST USER"},
},
}
if err := client.SendEmailTpl(sendAddr, "test_template_active", xs); err != nil {
log.Println("Send email error:", err)
}
}
```