Documentation
¶
Index ¶
Constants ¶
View Source
const ( PriorityLow priority = "LOW" PriorityHigh priority = "HIGH" )
Variables ¶
View Source
var (
ErrUnableToSendEmail = errors.New("unable to send email")
)
Functions ¶
This section is empty.
Types ¶
type Attachment ¶
type Attachment struct {
Filename string `json:"fileName"`
// Content is the base64 encoded content of the attachment
Content string `json:"content"`
ContentType ContentType `json:"contentType"`
ContentID string `json:"contentId"`
}
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) SendMarketingEmail ¶
func (c *Client) SendMarketingEmail(email Email) (*SendEmailResponse, error)
func (*Client) SendTransactionalEmail ¶
func (c *Client) SendTransactionalEmail(email Email) (*SendEmailResponse, error)
type ContentType ¶
type ContentType string
const ( ContentTypePNG ContentType = "image/png" ContentTypeJPG ContentType = "image/jpg" ContentTypeJPEG ContentType = "image/jpeg" ContentTypePDF ContentType = "application/pdf" ContentTypeDoc ContentType = "application/doc" ContentTypeDocx ContentType = "application/docx" ContentTypeText ContentType = "application/zip" )
type Email ¶
type Email struct {
From Address `json:"from"`
ReplyTo *Address `json:"replyTo,omitempty"`
To []Address `json:"to"`
Cc []Address `json:"cc,omitempty"`
Bcc []Address `json:"bcc,omitempty"`
Subject string `json:"subject"`
HTMLBody string `json:"html"`
TextBody string `json:"text"`
Attachments []Attachment `json:"attachments,omitempty"`
CustomerReference string `json:"customerReference,omitempty"`
Priority priority `json:"-"`
}
type SendEmailResponse ¶
type WebhookEvent ¶
type WebhookEvent string
const ( WebhookEventDelivered WebhookEvent = "Delivered" WebhookEventOpened WebhookEvent = "Opened" WebhookEventClicked WebhookEvent = "Clicked" WebhookEventBounced WebhookEvent = "Bounced" WebhookEventUnsubscribed WebhookEvent = "Unsubscribed" WebhookEventComplained WebhookEvent = "Complained" )
Click to show internal directories.
Click to hide internal directories.