Skip to content
This repository has been archived by the owner on May 2, 2020. It is now read-only.

tylerstillwater/sendwithus_go

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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/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)
	}
}

MIT License

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

About

Simple Go package to interact with SendWithUs.com API

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%