This is a simple package to interface with SendWithUs using Golang.
$ go get github.com/elbuo8/sendwithus_go
This is a brief example on how to send 1 email. You can find more examples by looking at the test cases.
package main
import (
"github.com/tylerb/sendwithus_go"
"fmt"
)
func main() {
api := swu.New("SWU_KEY")
email := &swu.Email{
ID: "EMAIL_TEMPLATE_ID",
Recipient: &swu.Recipient{
Address: "example@email.com",
},
EmailData: make(map[string]string),
}
err := api.Send(email)
if err != nil {
fmt.Println(err)
}
}
Enjoy! Feel free to send pull requests or submit issues :)