Documentation ¶
Index ¶
- func GetContentHashBase64(content []byte) string
- func GetHmac(content string, key []byte) string
- type Attachment
- type AzureACSEmailProvider
- type CommunicationError
- type Content
- type CustomHeader
- type Email
- type EmailAddress
- type EmailProvider
- type ErrorResponse
- type Recipients
- type SmtpEmailProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetContentHashBase64 ¶
Types ¶
type Attachment ¶
type AzureACSEmailProvider ¶
func NewAzureACSEmailProvider ¶
func NewAzureACSEmailProvider(accessKey string, endpoint string) *AzureACSEmailProvider
type CommunicationError ¶
CommunicationError contains the error code and message
type CustomHeader ¶
type Email ¶
type Email struct { Recipients Recipients `json:"recipients"` SenderAddress string `json:"senderAddress"` Content Content `json:"content"` Headers []CustomHeader `json:"headers"` Tracking bool `json:"disableUserEngagementTracking"` Importance string `json:"importance"` ReplyTo []EmailAddress `json:"replyTo"` Attachments []Attachment `json:"attachments"` }
type EmailAddress ¶
type EmailProvider ¶
type EmailProvider interface {
Send(fromAddress string, fromName, toAddress string, subject string, content string) error
}
func GetEmailProvider ¶
type ErrorResponse ¶
type ErrorResponse struct {
Error CommunicationError `json:"error"`
}
type Recipients ¶
type Recipients struct { To []EmailAddress `json:"to"` CC []EmailAddress `json:"cc"` BCC []EmailAddress `json:"bcc"` }
type SmtpEmailProvider ¶
type SmtpEmailProvider struct {
Dialer *gomail.Dialer
}
func NewSmtpEmailProvider ¶
Click to show internal directories.
Click to hide internal directories.