ses

package
v0.0.0-...-93f2c22 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2017 License: LGPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

ses.go

ses_types

sign

Index

Constants

View Source
const (
	AMZ_DATE_STYLE = "Mon, 02 Jan 2006 15:04:05 -0700"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Body

type Body struct {
	Html Content
	Text Content
}

Private internal representation of message body.

type Content

type Content struct {
	Charset string
	Data    string
}

Content data structure with charset and payload (Data).

type Email

type Email struct {
	// contains filtered or unexported fields
}

Email data structure. Should be main data structure used for sending emails using SES.

func NewEmail

func NewEmail() *Email

Returns a pointer to an empty but initialized Email.

func (*Email) AddBCC

func (em *Email) AddBCC(address string)

Add a BCC destination to Email.

func (*Email) AddBCCs

func (em *Email) AddBCCs(addresses []string)

Add multiple BCC destinations to Email.

func (*Email) AddCC

func (em *Email) AddCC(address string)

Add a CC destination to Email.

func (*Email) AddCCs

func (em *Email) AddCCs(addresses []string)

Add multiple CC destinations to Email.

func (*Email) AddReplyTo

func (em *Email) AddReplyTo(address string)

Add a reply-to address to Email.

func (*Email) AddReplyTos

func (em *Email) AddReplyTos(addresses []string)

Add multiple reply-to addresses to Email.

func (*Email) AddTo

func (em *Email) AddTo(address string)

Add a To destination to Email.

func (*Email) AddTos

func (em *Email) AddTos(addresses []string)

Add multiple To destinations to Email.

func (*Email) SetBodyHtml

func (em *Email) SetBodyHtml(html string)

Sets the HTML body of the Email message. Uses ASCII as charset.

func (*Email) SetBodyHtmlAsContent

func (em *Email) SetBodyHtmlAsContent(html Content)

Sets the HTML body of the Email message. Uses the charset (or ASCII if none) of Content.

func (*Email) SetBodyRawText

func (em *Email) SetBodyRawText(text string)

Sets the raw text body of the Email message. Uses ASCII as charset.

func (*Email) SetBodyRawTextAsContent

func (em *Email) SetBodyRawTextAsContent(text Content)

Sets the raw test body of the Email message. Uses the charset (or ASCII if none) of Content.

func (*Email) SetMessage

func (em *Email) SetMessage(message Message)

Set the Email message.

func (*Email) SetReturnPath

func (em *Email) SetReturnPath(path string)

Set the return path for Email.

func (*Email) SetSource

func (em *Email) SetSource(source string)

Set the source address for Email.

func (*Email) SetSubject

func (em *Email) SetSubject(subject string)

Set the subject for the Email message. Uses ASCII as charset.

func (*Email) SetSubjectAsContent

func (em *Email) SetSubjectAsContent(subject Content)

Set the subject for the Email message. Uses the charset (or ASCII if none) of Content.

type Message

type Message struct {
	Body    Body
	Subject Content
}

Message data structure.

type SES

type SES struct {
	// contains filtered or unexported fields
}

func NewSES

func NewSES(auth aws.Auth, region aws.Region) *SES

Initializes a pointer to an SES struct which can be used to perform SES API calls.

func (*SES) SendEmail

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

Sends an email to the specifications stored in the Email struct.

type SESError

type SESError struct {
	Type      string
	Code      string
	Message   string
	Detail    string
	RequestId string
}

SES Error structure.

func (*SESError) Error

func (err *SESError) Error() string

Jump to

Keyboard shortcuts

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