Simple Go package to interact with SendWithUs.com API
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
.travis.yml
README.md
swu.go
swu_test.go

README.md

SendWithUs-Go

This is a simple package to interface with SendWithUs using Golang.

Installation

$ go get github.com/elbuo8/sendwithus_go

Example

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/elbuo8/sendwithus_go"
  "fmt"
)

func main() {
	api := New("SWU_KEY")
	email := &SWUEmail{
		ID: "EMAIL_TEMPLATE_ID",
		Recipient: &SWURecipient{
			Address: "example@email.com",
		},
		EmailData: make(map[string]string),
	}
	err := api.Send(email)
	if err != nil {
      fmt.Println(err)
	}
}

Documentation (GoDoc)

MIT License

Enjoy! Feel free to send pull requests or submit issues :)