Documentation
¶
Index ¶
- Constants
- type Filter
- type SMTPAPIHeader
- func (h *SMTPAPIHeader) AddCategories(categories []string)
- func (h *SMTPAPIHeader) AddCategory(category string)
- func (h *SMTPAPIHeader) AddFilter(filter, setting, value string)
- func (h *SMTPAPIHeader) AddSection(section, value string)
- func (h *SMTPAPIHeader) AddSendEachAt(sendEachAt int64)
- func (h *SMTPAPIHeader) AddSubstitution(key, sub string)
- func (h *SMTPAPIHeader) AddSubstitutions(key string, subs []string)
- func (h *SMTPAPIHeader) AddTo(email string)
- func (h *SMTPAPIHeader) AddTos(emails []string)
- func (h *SMTPAPIHeader) AddUniqueArg(arg, value string)
- func (h *SMTPAPIHeader) JSONString() (string, error)
- func (h *SMTPAPIHeader) SetASMGroupID(groupID int)
- func (h *SMTPAPIHeader) SetCategories(categories []string)
- func (h *SMTPAPIHeader) SetFilter(filter string, value *Filter)
- func (h *SMTPAPIHeader) SetIpPool(ipPool string)
- func (h *SMTPAPIHeader) SetSections(sections map[string]string)
- func (h *SMTPAPIHeader) SetSendAt(sendAt int64)
- func (h *SMTPAPIHeader) SetSendEachAt(sendEachAt []int64)
- func (h *SMTPAPIHeader) SetSubstitutions(sub map[string][]string)
- func (h *SMTPAPIHeader) SetTos(emails []string)
- func (h *SMTPAPIHeader) SetUniqueArgs(args map[string]string)
Constants ¶
const Version = "0.4.0"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SMTPAPIHeader ¶
type SMTPAPIHeader struct { To []string `json:"to,omitempty"` Sub map[string][]string `json:"sub,omitempty"` Section map[string]string `json:"section,omitempty"` Category []string `json:"category,omitempty"` UniqueArgs map[string]string `json:"unique_args,omitempty"` Filters map[string]Filter `json:"filters,omitempty"` ASMGroupID int `json:"asm_group_id,omitempty"` SendAt int64 `json:"send_at,omitempty"` SendEachAt []int64 `json:"send_each_at,omitempty"` IpPool string `json:"ip_pool,omitempty"` }
SMTPAPIHeader will be used to set up X-SMTPAPI params
func NewSMTPAPIHeader ¶
func NewSMTPAPIHeader() *SMTPAPIHeader
NewSMTPAPIHeader creates a new header struct
func (*SMTPAPIHeader) AddCategories ¶
func (h *SMTPAPIHeader) AddCategories(categories []string)
AddCategories adds multiple categories to the Category header
func (*SMTPAPIHeader) AddCategory ¶
func (h *SMTPAPIHeader) AddCategory(category string)
AddCategory adds a new category to the Category header
func (*SMTPAPIHeader) AddFilter ¶
func (h *SMTPAPIHeader) AddFilter(filter, setting, value string)
AddFilter will set the specific setting for a filter
func (*SMTPAPIHeader) AddSection ¶
func (h *SMTPAPIHeader) AddSection(section, value string)
AddSection sets the value for a specific section
func (*SMTPAPIHeader) AddSendEachAt ¶
func (h *SMTPAPIHeader) AddSendEachAt(sendEachAt int64)
AddSendEachAt takes in a timestamp and pushes it into a list Must match length of To emails
func (*SMTPAPIHeader) AddSubstitution ¶
func (h *SMTPAPIHeader) AddSubstitution(key, sub string)
AddSubstitution adds a new substitution to a specific key
func (*SMTPAPIHeader) AddSubstitutions ¶
func (h *SMTPAPIHeader) AddSubstitutions(key string, subs []string)
AddSubstitutions adds a multiple substitutions to a specific key
func (*SMTPAPIHeader) AddTo ¶
func (h *SMTPAPIHeader) AddTo(email string)
AddTo appends a single email to the To header
func (*SMTPAPIHeader) AddTos ¶
func (h *SMTPAPIHeader) AddTos(emails []string)
AddTos appends multiple emails to the To header
func (*SMTPAPIHeader) AddUniqueArg ¶
func (h *SMTPAPIHeader) AddUniqueArg(arg, value string)
AddUniqueArg will set the value of a specific argument
func (*SMTPAPIHeader) JSONString ¶
func (h *SMTPAPIHeader) JSONString() (string, error)
JSONString returns the representation of the Header
func (*SMTPAPIHeader) SetASMGroupID ¶
func (h *SMTPAPIHeader) SetASMGroupID(groupID int)
SetASMGroupID will set the value of the ASMGroupID field
func (*SMTPAPIHeader) SetCategories ¶
func (h *SMTPAPIHeader) SetCategories(categories []string)
SetCategories will set the value of the Categories field
func (*SMTPAPIHeader) SetFilter ¶
func (h *SMTPAPIHeader) SetFilter(filter string, value *Filter)
SetFilter takes in a Filter struct with predetermined settings and sets it for such Filter key
func (*SMTPAPIHeader) SetIpPool ¶
func (h *SMTPAPIHeader) SetIpPool(ipPool string)
SetIpPool takes a strings and sets the IpPool field
func (*SMTPAPIHeader) SetSections ¶
func (h *SMTPAPIHeader) SetSections(sections map[string]string)
SetSections sets the value for the Section header
func (*SMTPAPIHeader) SetSendAt ¶
func (h *SMTPAPIHeader) SetSendAt(sendAt int64)
SetSendAt takes in a timestamp which determines when the email will be sent
func (*SMTPAPIHeader) SetSendEachAt ¶
func (h *SMTPAPIHeader) SetSendEachAt(sendEachAt []int64)
SetSendEachAt takes an array of timestamps. Must match length of To emails
func (*SMTPAPIHeader) SetSubstitutions ¶
func (h *SMTPAPIHeader) SetSubstitutions(sub map[string][]string)
SetSubstitutions sets the value of the substitutions on the Sub header
func (*SMTPAPIHeader) SetTos ¶
func (h *SMTPAPIHeader) SetTos(emails []string)
SetTos sets the value of the To header
func (*SMTPAPIHeader) SetUniqueArgs ¶
func (h *SMTPAPIHeader) SetUniqueArgs(args map[string]string)
SetUniqueArgs will set the value of the Unique_args header