Skip to content
This repository was archived by the owner on May 29, 2018. It is now read-only.

Latest commit

History

26 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

go-ses - send email using Amazon AWS Simple Email Service

xrefsfuncstop funclibrary usersstatus

go-ses is an API client library for Amazon AWS Simple Email Service (SES). It is a fork of Patrick Crosby's stathat/amzses.

Note: the public API is experimental and subject to change until further notice.

Usage

Documentation: go-ses on Sourcegraph.

Example: example_test.go (Sourcegraph):

package ses_test
import (
"fmt""github.com/sourcegraph/go-ses"
)
funcExample() {
// Change the From address to a sender address that is verified in your Amazon SES account.from:="notify@sourcegraph.com"to:="success@simulator.amazonses.com"// EnvConfig uses the AWS credentials in the environment variables $AWS_ACCESS_KEY_ID and// $AWS_SECRET_KEY.res, err:=ses.EnvConfig.SendEmail(from, to, "Hello, world!", "Here is the message body.")
iferr==nil {
fmt.Printf("Sent email: %s...\n", res[:32])
} else {
fmt.Printf("Error sending email: %s\n", err)
}
// output:// Sent email: <SendEmailResponse xmlns="http:/...
}

Running tests

  1. Set the environment variables $AWS_ACCESS_KEY_ID and $AWS_SECRET_KEY and $AWS_SES_ENDPOINT.
  2. Example SES Endpoint https://email.us-west-2.amazonaws.com
  3. Run go test -from=user@example.com, where user@example.com is a sender address that is verified in your Amazon SES account.

Contributors

Changelog

2013-06-11 (forked from stathat/amzses)

  • renamed API functions to be consistent with AWS SES API endpoints
  • reads AWS credentials from a Config struct, not from a config file
  • added runnable example_test.go

About

Amazon AWS Simple Email Service (SES) client for Go

Resources

Stars

49 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages