Overview

This is a Go package to send emails using Amazon's Simple Email Service.

Installation

Use go get:

go get github.com/stathat/amzses

If you are building your Go code with go install, you can skip the previous step and just import amzses as follows:

import (
        "github.com/stathat/amzses"
)

Using go install will automatically install its one external dependency, jconfig.

Usage

You need to put your AWS key information in a config file at /etc/aws.conf. It should look like this:

{
        "aws_access_key": "XXX_YOUR_ACCESS_KEY_XXX",
        "aws_secret_key": "YYY_YOUR_SECRET_KEY_YYY"
}

The amzses package exposes only one function, SendMail. Call it with the sender, recipient, subject, and body:

amzses.SendMail("info@example.com", "user@gmail.com", "Welcome!", "Welcome to our project!\n\n...")

Contact us

We'd love to hear from you if you are using amzses in your projects! Please drop us a line.

Author

Patrick Crosby

Source available on github »

For more information on StatHat, visit the home page.