ses

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 16, 2016 License: MIT Imports: 2 Imported by: 0

README

go-ses

Package ses provides a small wrapper around AWS SES.

Badges

GoDoc

Basic Usage

package main

import (
	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/aws/session"
	"github.com/aws/aws-sdk-go/service/ses"
	sses "github.com/tj/go-ses"
)

func main() {
	svc := ses.New(session.New(aws.NewConfig()))
	mailer := sses.SES{svc}

	email := sses.Email{
		From:    "me@example.com",
		To:      []string{"you@example.com"},
		Subject: "Hey you!",
		Text:    "Hi",
		HTML:    "<strong>Hi</strong>",
	}

	mailer.SendEmail(email)
}

tjholowaychuk.com  ·  GitHub @tj  ·  Twitter @tjholowaychuk

Documentation

Overview

Package ses provides a small wrapper around AWS SES.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Email

type Email struct {
	From    string   // From source email
	To      []string // To destination email(s)
	Subject string   // Subject text to send
	Text    string   // Text is the text body representation
	HTML    string   // HTMLBody is the HTML body representation
	ReplyTo []string // Reply-To email(s)
}

Email options.

type SES

type SES struct {
	Service sesiface.SESAPI // Service implementation
}

SES alert support.

func (*SES) SendEmail

func (s *SES) SendEmail(email Email) error

SendEmail message.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL