Skip to content

darkhelmet/postmark

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code
This branch is 8 commits ahead of gcmurphy:master.

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
This project is no longer actively maintained. I might get back to it one 
day. Have updated things for the Go version 1 release.

Very basic access to the postmark API. At the moment it just allows you to 
send a single message at a time. 

Example: 

package main

import (
    "os"
    "github.com/gcmurphy/postmark"
)

func main(){

    msg := &postmark.Message {
                From: "betty@gmail.com",
                To: "bob@hotmail.com",
                Subject: "I IS TEN NINJA'S",
                TextBody: `
                    Dear Bob, 

                    Check out this sweet ninja cat.

                    Sincerely,

                    Betty.`,
            }

    msg.Attach("ninja_cat.jpg")

    pm := postmark.NewPostmark("YOUR_API_KEY")
    rsp, err := pm.Send(msg)
    if err != nil {
        println(err.Error())
        os.Exit(1)
    }
    println(rsp.String())
}

About

Go package for postmark

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 98.9%
  • Shell 1.1%