Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddressItem ¶
type AddressItem struct {
Email string `json:"email" validate:"required,email"`
}
AddressItem is a SparkPost Address item
type Content ¶
type Content struct {
EmailRFC822 string `json:"email_rfc822"`
}
Content is the transmission content
type Converter ¶
Converter converts an input to a ConvertedMessage
func NewRFC5322 ¶
func NewRFC5322() Converter
NewRFC5322 returns a new message converter for RFC 5322 format
func NewSparkPost ¶
func NewSparkPost() Converter
NewSparkPost returns a new SparkPost transmission converter
type ID ¶
type ID string
ID is a converter ID type
const RFC5322ID ID = "rfc5322"
RFC5322ID is the ID for RFC5322 converter
const SparkPostID ID = "sparkpost"
SparkPostID is the ID for SparkPost converter
const StubConverterID ID = "stub"
StubConverterID is the Stub converter ID
type Message ¶
type Message struct {
// contains filtered or unexported fields
}
Message represents an email message
func NewMessage ¶
NewMessage returns a new Message instance
func (*Message) HasRecipients ¶
HasRecipients returns true if the message contains as least one recipient amongst To, Cc and Bcc.
type Provider ¶
Provider exposes the provider methods
func NewProvider ¶
NewProvider returns a new and initialized provider with given converters
type RecipientProvider ¶
RecipientProvider is the common func type for To(), Cc() and Bcc()
type SparkPostTransmission ¶
type SparkPostTransmission struct { Recipients []Address `json:"recipients" validate:"required,min=1,dive,required"` Content Content `json:"content" validate:"required"` }
SparkPostTransmission represents a SparkPost transmission See: https://developers.sparkpost.com/api/transmissions/#transmissions-create-a-transmission