package ses
import "github.com/crowdmob/goamz/exp/ses"
Index ¶
- Constants
- type Body
- type Bounce
- type BouncedRecipient
- type ComplainedRecipient
- type Complaint
- type Content
- type Delivery
- type Destination
- type Error
- type ErrorResponse
- type Mail
- type Message
- type ResponseMetadata
- type SES
- func New(auth aws.Auth, region aws.Region) *SES
- func (s *SES) SendEmail(fromAddress string, destination *Destination, message *Message) (*SendEmailResponse, error)
- func (s *SES) SimulateDelivery(from string) (*SendEmailResponse, error)
- type SNSNotification
- type SendEmailResponse
- type SendEmailResult
Constants ¶
const ( NOTIFICATION_TYPE_BOUNCE = "Bounce" NOTIFICATION_TYPE_COMPLAINT = "Complaint" NOTIFICATION_TYPE_DELIVERY = "Delivery" //http://docs.aws.amazon.com/ses/latest/DeveloperGuide/notification-contents.html#bounce-types BOUNCE_TYPE_UNDETERMINED = "Undetermined" BOUNCE_TYPE_PERMANENT = "Permanent" BOUNCE_TYPE_TRANSIENT = "Transient" BOUNCE_SUBTYPE_UNDETERMINED = "Undetermined" BOUNCE_SUBTYPE_GENERAL = "General" BOUNCE_SUBTYPE_NO_EMAIL = "NoEmail" BOUNCE_SUBTYPE_SUPPRESSED = "Suppressed" BOUNCE_SUBTYPE_MAILBOX_FULL = "MailboxFull" BOUNCE_SUBTYPE_MESSAGE_TOO_LARGE = "MessageTooLarge" BOUNCE_SUBTYPE_CONTENT_REJECTED = "ContentRejected" BOUNCE_SUBTYPE_ATTACHMENT_REJECTED = "AttachmentRejected" // http://www.iana.org/assignments/marf-parameters/marf-parameters.xml#marf-parameters-2 COMPLAINT_FEEDBACK_TYPE_ABUSE = "abuse" COMPLAINT_FEEDBACK_TYPE_AUTH_FAILURE = "auth-failure" COMPLAINT_FEEDBACK_TYPE_FRAUD = "fraud" COMPLAINT_FEEDBACK_TYPE_NOT_SPAM = "not-spam" COMPLAINT_FEEDBACK_TYPE_OTHER = "other" COMPLAINT_FEEDBACK_TYPE_VIRUS = "virus" )
const MAX_RECIPIENTS_PER_REQUEST = 50
Types ¶
type Body ¶
Represents the body of the message. You can specify text, HTML, or both. If you use both, then the message should display correctly in the widest variety of email clients.
type Bounce ¶
type Bounce struct {
BounceType string `json:"bounceType"`
BounceSubType string `json:"bounceSubType"`
BouncedRecipients []*BouncedRecipient `json:"bouncedRecipients"`
ReportingMTA string `json:"reportingMTA"`
Timestamp time.Time `json:"timestamp"`
FeedbackId string `json:"feedbackId"`
}
A bounce notifiction object http://docs.aws.amazon.com/ses/latest/DeveloperGuide/notification-contents.html#bounce-object
type BouncedRecipient ¶
type BouncedRecipient struct {
EmailAddress string `json:"emailAddress"`
Action string `json:"action"`
Status string `json:"status"`
DiagnosticCode string `json:"diagnosticCode"`
}
A bounced recipient http://docs.aws.amazon.com/ses/latest/DeveloperGuide/notification-contents.html#bounced-recipients
type ComplainedRecipient ¶
type ComplainedRecipient struct {
EmailAddress string `json:"emailAddress"`
}
A receipient which complained http://docs.aws.amazon.com/ses/latest/DeveloperGuide/notification-contents.html#complained-recipients
type Complaint ¶
type Complaint struct {
UserAgent string `json:"userAgent"`
ComplainedRecipients []*BouncedRecipient `json:"complainedRecipients"`
ComplaintFeedbackType string `json:"complaintFeedbackType"`
ArrivalDate time.Time `json:"arrivalDate"`
Timestamp time.Time `json:"timestamp"`
FeedbackId string `json:"feedbackId"`
}
A complain notification object http://docs.aws.amazon.com/ses/latest/DeveloperGuide/notification-contents.html#complaint-object
type Content ¶
Represents textual data, plus an optional character set specification. By default, the text must be 7-bit ASCII, due to the constraints of the SMTP protocol. If the text must contain any other characters, then you must also specify a character set. Examples include UTF-8, ISO-8859-1, and Shift_JIS.
type Delivery ¶
type Delivery struct {
Timestamp time.Time `json:"timestamp"`
ProcessingTimeMillis int64 `json:"processingTimeMillis"`
Recipients []string `json:"recipients"`
SmtpResponse string `json:"smtpResponse"`
ReportingMTA string `json:"reportingMTA"`
}
A successful delivery http://docs.aws.amazon.com/ses/latest/DeveloperGuide/notification-contents.html#delivery-object
type Destination ¶
Represents the destination of the message, consisting of To:, CC:, and BCC: fields.
func NewDestination ¶
func NewDestination(toAddresses, ccAddresses, bccAddresses []string) *Destination
Creates a new destination TODO: specify address encoding
type Error ¶
type Error struct {
StatusCode int `xml:"StatusCode"`
Code string `xml:"Code"`
Message string `xml:"Message"`
}
func (*Error) Error ¶
func (*Error) String ¶
type ErrorResponse ¶
type ErrorResponse struct {
XMLName xml.Name `xml:"ErrorResponse"`
RequestId string `xml:"RequestId"`
Error Error `xml:"Error"`
}
type Mail ¶
type Mail struct {
Timestamp time.Time `json:"timestamp"`
MessageId string `json:"messageId"`
Source string `json:"source"`
Destination []string `json:"destination"`
}
Represent the delivery of an email
type Message ¶
Represents the message to be sent, composed of a subject and a body.
func NewMessage ¶
Creates a new message with UTF-8 encoding
type ResponseMetadata ¶
type ResponseMetadata struct {
MessageId string `xml:"RequestId"`
}
type SES ¶
func New ¶
Creates a new instance of the SES client
func (*SES) SendEmail ¶
func (s *SES) SendEmail(fromAddress string, destination *Destination, message *Message) (*SendEmailResponse, error)
func (*SES) SimulateDelivery ¶
func (s *SES) SimulateDelivery(from string) (*SendEmailResponse, error)
This is an helper function to send emails to the mailbox simulator. http://docs.aws.amazon.com/ses/latest/DeveloperGuide/mailbox-simulator.html
from: the source email address registered in your SES account
type SNSNotification ¶
type SNSNotification struct {
NotificationType string `json:"notificationType"`
Bounce *Bounce `json:"bounce" optional`
Complaint *Complaint `json:"complaint" optional`
Delivery *Delivery `json:"delivery" optional`
Mail *Mail `json:"mail"`
}
type SendEmailResponse ¶
type SendEmailResponse struct {
XMLName xml.Name `xml:"SendEmailResponse"`
SendEmailResult SendEmailResult `xml:"SendEmailResult"`
ResponseMetadata ResponseMetadata `xml:"ResponseMetadata"`
}
Represents a unique message ID returned from a successful SendEmail request.
type SendEmailResult ¶
type SendEmailResult struct {
MessageId string `xml:"MessageId"`
}
Source Files ¶
delivery_notification.go mailbox_simulator.go ses.go
- Version
- v0.0.0-20150128194925-3a06871fe9fc (latest)
- Published
- Jan 28, 2015
- Platform
- linux/amd64
- Imports
- 10 packages
- Last checked
- 10 months ago –
Tools for package owners.