Documentation ¶
Index ¶
- func GetRequestBody(m *SGMailV3) []byte
- type Asm
- type Attachment
- func (a *Attachment) SetContent(content string) *Attachment
- func (a *Attachment) SetContentID(contentID string) *Attachment
- func (a *Attachment) SetDisposition(disposition string) *Attachment
- func (a *Attachment) SetFilename(filename string) *Attachment
- func (a *Attachment) SetType(contentType string) *Attachment
- type BccSetting
- type ClickTrackingSetting
- type Content
- type Email
- type FooterSetting
- type GaSetting
- func (g *GaSetting) SetCampaignContent(campaignContent string) *GaSetting
- func (g *GaSetting) SetCampaignMedium(campaignMedium string) *GaSetting
- func (g *GaSetting) SetCampaignName(campaignName string) *GaSetting
- func (g *GaSetting) SetCampaignSource(campaignSource string) *GaSetting
- func (g *GaSetting) SetCampaignTerm(campaignTerm string) *GaSetting
- func (g *GaSetting) SetEnable(enable bool) *GaSetting
- type MailSettings
- func (m *MailSettings) SetBCC(bcc *BccSetting) *MailSettings
- func (m *MailSettings) SetBypassListManagement(bypassListManagement *Setting) *MailSettings
- func (m *MailSettings) SetFooter(footerSetting *FooterSetting) *MailSettings
- func (m *MailSettings) SetSandboxMode(sandboxMode *Setting) *MailSettings
- func (m *MailSettings) SetSpamCheckSettings(spamCheckSetting *SpamCheckSetting) *MailSettings
- type OpenTrackingSetting
- type Personalization
- func (p *Personalization) AddBCCs(bcc ...*Email)
- func (p *Personalization) AddCCs(cc ...*Email)
- func (p *Personalization) AddTos(to ...*Email)
- func (p *Personalization) SetCustomArg(key string, value string)
- func (p *Personalization) SetHeader(key string, value string)
- func (p *Personalization) SetSendAt(sendAt int)
- func (p *Personalization) SetSubstitution(key string, value string)
- type SGMailV3
- func (s *SGMailV3) AddAttachment(a ...*Attachment) *SGMailV3
- func (s *SGMailV3) AddCategories(category ...string) *SGMailV3
- func (s *SGMailV3) AddContent(c ...*Content) *SGMailV3
- func (s *SGMailV3) AddPersonalizations(p ...*Personalization) *SGMailV3
- func (s *SGMailV3) AddSection(key string, value string) *SGMailV3
- func (s *SGMailV3) SetASM(asm *Asm) *SGMailV3
- func (s *SGMailV3) SetBatchID(batchID string) *SGMailV3
- func (s *SGMailV3) SetCustomArg(key string, value string) *SGMailV3
- func (s *SGMailV3) SetFrom(e *Email) *SGMailV3
- func (s *SGMailV3) SetHeader(key string, value string) *SGMailV3
- func (s *SGMailV3) SetIPPoolID(ipPoolID string) *SGMailV3
- func (s *SGMailV3) SetMailSettings(mailSettings *MailSettings) *SGMailV3
- func (s *SGMailV3) SetReplyTo(e *Email) *SGMailV3
- func (s *SGMailV3) SetSendAt(sendAt int) *SGMailV3
- func (s *SGMailV3) SetTemplateID(templateID string) *SGMailV3
- func (s *SGMailV3) SetTrackingSettings(trackingSettings *TrackingSettings) *SGMailV3
- type SandboxModeSetting
- type Setting
- type SpamCheckSetting
- type SubscriptionTrackingSetting
- func (s *SubscriptionTrackingSetting) SetEnable(enable bool) *SubscriptionTrackingSetting
- func (s *SubscriptionTrackingSetting) SetHTML(html string) *SubscriptionTrackingSetting
- func (s *SubscriptionTrackingSetting) SetSubstitutionTag(subTag string) *SubscriptionTrackingSetting
- func (s *SubscriptionTrackingSetting) SetText(text string) *SubscriptionTrackingSetting
- type TrackingSettings
- func (t *TrackingSettings) SetClickTracking(clickTracking *ClickTrackingSetting) *TrackingSettings
- func (t *TrackingSettings) SetGoogleAnalytics(googleAnalytics *GaSetting) *TrackingSettings
- func (t *TrackingSettings) SetOpenTracking(openTracking *OpenTrackingSetting) *TrackingSettings
- func (t *TrackingSettings) SetSubscriptionTracking(subscriptionTracking *SubscriptionTrackingSetting) *TrackingSettings
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRequestBody ¶
Types ¶
type Asm ¶
type Asm struct { GroupID int `json:"group_id,omitempty"` GroupsToDisplay []int `json:"groups_to_display,omitempty"` }
func (*Asm) AddGroupsToDisplay ¶
func (*Asm) SetGroupID ¶
type Attachment ¶
type Attachment struct { Content string `json:"content,omitempty"` Type string `json:"type,omitempty"` Name string `json:"name,omitempty"` Filename string `json:"filename,omitempty"` Disposition string `json:"disposition,omitempty"` ContentID string `json:"content_id,omitempty"` }
func NewAttachment ¶
func NewAttachment() *Attachment
func (*Attachment) SetContent ¶
func (a *Attachment) SetContent(content string) *Attachment
func (*Attachment) SetContentID ¶
func (a *Attachment) SetContentID(contentID string) *Attachment
func (*Attachment) SetDisposition ¶
func (a *Attachment) SetDisposition(disposition string) *Attachment
func (*Attachment) SetFilename ¶
func (a *Attachment) SetFilename(filename string) *Attachment
func (*Attachment) SetType ¶
func (a *Attachment) SetType(contentType string) *Attachment
type BccSetting ¶
type BccSetting struct { Enable bool `json:"enable,omitempty"` Email string `json:"email,omitempty"` }
func NewBCCSetting ¶
func NewBCCSetting() *BccSetting
func (*BccSetting) SetEmail ¶
func (b *BccSetting) SetEmail(email string) *BccSetting
func (*BccSetting) SetEnable ¶
func (b *BccSetting) SetEnable(enable bool) *BccSetting
type ClickTrackingSetting ¶
type ClickTrackingSetting struct { Enable bool `json:"enable,omitempty"` EnableText bool `json:"enable_text,omitempty"` }
func NewClickTrackingSetting ¶
func NewClickTrackingSetting() *ClickTrackingSetting
func (*ClickTrackingSetting) SetEnable ¶
func (c *ClickTrackingSetting) SetEnable(enable bool) *ClickTrackingSetting
func (*ClickTrackingSetting) SetEnableText ¶
func (c *ClickTrackingSetting) SetEnableText(enableText bool) *ClickTrackingSetting
type Content ¶
func NewContent ¶
type FooterSetting ¶
type FooterSetting struct {}
func NewFooterSetting ¶
func NewFooterSetting() *FooterSetting
func (*FooterSetting) SetEnable ¶
func (f *FooterSetting) SetEnable(enable bool) *FooterSetting
func (*FooterSetting) SetHTML ¶
func (f *FooterSetting) SetHTML(html string) *FooterSetting
func (*FooterSetting) SetText ¶
func (f *FooterSetting) SetText(text string) *FooterSetting
type GaSetting ¶
type GaSetting struct { Enable bool `json:"enable,omitempty"` CampaignSource string `json:"utm_source,omitempty"` CampaignTerm string `json:"utm_term,omitempty"` CampaignContent string `json:"utm_content,omitempty"` CampaignName string `json:"utm_campaign,omitempty"` CampaignMedium string `json:"utm_medium,omitempty"` }
func NewGaSetting ¶
func NewGaSetting() *GaSetting
func (*GaSetting) SetCampaignContent ¶
func (*GaSetting) SetCampaignMedium ¶
func (*GaSetting) SetCampaignName ¶
func (*GaSetting) SetCampaignSource ¶
func (*GaSetting) SetCampaignTerm ¶
type MailSettings ¶
type MailSettings struct { BCC *BccSetting `json:"bcc,omitempty"` BypassListManagement *Setting `json:"bypass_list_management,omitempty"` SandboxMode *Setting `json:"sandbox_mode,omitempty"` SpamCheckSetting *SpamCheckSetting `json:"spam_check,omitempty"` }
func NewMailSettings ¶
func NewMailSettings() *MailSettings
func (*MailSettings) SetBCC ¶
func (m *MailSettings) SetBCC(bcc *BccSetting) *MailSettings
func (*MailSettings) SetBypassListManagement ¶
func (m *MailSettings) SetBypassListManagement(bypassListManagement *Setting) *MailSettings
func (*MailSettings) SetFooter ¶
func (m *MailSettings) SetFooter(footerSetting *FooterSetting) *MailSettings
func (*MailSettings) SetSandboxMode ¶
func (m *MailSettings) SetSandboxMode(sandboxMode *Setting) *MailSettings
func (*MailSettings) SetSpamCheckSettings ¶
func (m *MailSettings) SetSpamCheckSettings(spamCheckSetting *SpamCheckSetting) *MailSettings
type OpenTrackingSetting ¶
type OpenTrackingSetting struct { Enable bool `json:"enable,omitempty"` SubstitutionTag string `json:"substitution_tag,omitempty"` }
func NewOpenTrackingSetting ¶
func NewOpenTrackingSetting() *OpenTrackingSetting
func (*OpenTrackingSetting) SetEnable ¶
func (o *OpenTrackingSetting) SetEnable(enable bool) *OpenTrackingSetting
func (*OpenTrackingSetting) SetSubstitutionTag ¶
func (o *OpenTrackingSetting) SetSubstitutionTag(subTag string) *OpenTrackingSetting
type Personalization ¶
type Personalization struct { To []*Email `json:"to,omitempty"` CC []*Email `json:"cc,omitempty"` BCC []*Email `json:"bcc,omitempty"` Subject string `json:"subject,omitempty"` Headers map[string]string `json:"headers,omitempty"` Substitutions map[string]string `json:"substitutions,omitempty"` CustomArgs map[string]string `json:"custom_args,omitempty"` Categories []string `json:"categories,omitempty"` SendAt int `json:"send_at,omitempty"` }
func NewPersonalization ¶
func NewPersonalization() *Personalization
func (*Personalization) AddBCCs ¶
func (p *Personalization) AddBCCs(bcc ...*Email)
func (*Personalization) AddCCs ¶
func (p *Personalization) AddCCs(cc ...*Email)
func (*Personalization) AddTos ¶
func (p *Personalization) AddTos(to ...*Email)
func (*Personalization) SetCustomArg ¶
func (p *Personalization) SetCustomArg(key string, value string)
func (*Personalization) SetHeader ¶
func (p *Personalization) SetHeader(key string, value string)
func (*Personalization) SetSendAt ¶
func (p *Personalization) SetSendAt(sendAt int)
func (*Personalization) SetSubstitution ¶
func (p *Personalization) SetSubstitution(key string, value string)
type SGMailV3 ¶
type SGMailV3 struct { From *Email `json:"from,omitempty"` Subject string `json:"subject,omitempty"` Personalizations []*Personalization `json:"personalizations,omitempty"` Content []*Content `json:"content,omitempty"` Attachments []*Attachment `json:"attachments,omitempty"` TemplateID string `json:"template_id,omitempty"` Sections map[string]string `json:"sections,omitempty"` Headers map[string]string `json:"headers,omitempty"` Categories []string `json:"categories,omitempty"` CustomArgs map[string]string `json:"custom_args,omitempty"` SendAt int `json:"send_at,omitempty"` BatchID string `json:"batch_id,omitempty"` Asm *Asm `json:"asm,omitempty"` IPPoolID string `json:"ip_pool_name,omitempty"` MailSettings *MailSettings `json:"mail_settings,omitempty"` TrackingSettings *TrackingSettings `json:"tracking_settings,omitempty"` ReplyTo *Email `json:"reply_to,omitempty"` }
func NewV3MailInit ¶
func (*SGMailV3) AddAttachment ¶
func (s *SGMailV3) AddAttachment(a ...*Attachment) *SGMailV3
func (*SGMailV3) AddCategories ¶
func (*SGMailV3) AddContent ¶
func (*SGMailV3) AddPersonalizations ¶
func (s *SGMailV3) AddPersonalizations(p ...*Personalization) *SGMailV3
func (*SGMailV3) SetBatchID ¶
func (*SGMailV3) SetIPPoolID ¶
func (*SGMailV3) SetMailSettings ¶
func (s *SGMailV3) SetMailSettings(mailSettings *MailSettings) *SGMailV3
func (*SGMailV3) SetReplyTo ¶
func (*SGMailV3) SetTemplateID ¶
func (*SGMailV3) SetTrackingSettings ¶
func (s *SGMailV3) SetTrackingSettings(trackingSettings *TrackingSettings) *SGMailV3
type SandboxModeSetting ¶
type SandboxModeSetting struct { Enable bool `json:"enable,omitempty"` ForwardSpam bool `json:"forward_spam,omitempty"` SpamCheck *SpamCheckSetting `json:"spam_check,omitempty"` }
func NewSandboxModeSetting ¶
func NewSandboxModeSetting(enable bool, forwardSpam bool, spamCheck *SpamCheckSetting) *SandboxModeSetting
type SpamCheckSetting ¶
type SpamCheckSetting struct { Enable bool `json:"enable,omitempty"` SpamThreshold int `json:"threshold,omitempty"` PostToURL string `json:"post_to_url,omitempty"` }
func NewSpamCheckSetting ¶
func NewSpamCheckSetting() *SpamCheckSetting
func (*SpamCheckSetting) SetEnable ¶
func (s *SpamCheckSetting) SetEnable(enable bool) *SpamCheckSetting
func (*SpamCheckSetting) SetPostToURL ¶
func (s *SpamCheckSetting) SetPostToURL(postToURL string) *SpamCheckSetting
func (*SpamCheckSetting) SetSpamThreshold ¶
func (s *SpamCheckSetting) SetSpamThreshold(spamThreshold int) *SpamCheckSetting
type SubscriptionTrackingSetting ¶
type SubscriptionTrackingSetting struct { Enable bool `json:"enable,omitempty"` Text string `json:"text,omitempty"` Html string `json:"html,omitempty"` SubstitutionTag string `json:"substitution_tag,omitempty"` }
func NewSubscriptionTrackingSetting ¶
func NewSubscriptionTrackingSetting() *SubscriptionTrackingSetting
func (*SubscriptionTrackingSetting) SetEnable ¶
func (s *SubscriptionTrackingSetting) SetEnable(enable bool) *SubscriptionTrackingSetting
func (*SubscriptionTrackingSetting) SetHTML ¶
func (s *SubscriptionTrackingSetting) SetHTML(html string) *SubscriptionTrackingSetting
func (*SubscriptionTrackingSetting) SetSubstitutionTag ¶
func (s *SubscriptionTrackingSetting) SetSubstitutionTag(subTag string) *SubscriptionTrackingSetting
func (*SubscriptionTrackingSetting) SetText ¶
func (s *SubscriptionTrackingSetting) SetText(text string) *SubscriptionTrackingSetting
type TrackingSettings ¶
type TrackingSettings struct { ClickTracking *ClickTrackingSetting `json:"click_tracking,omitempty"` OpenTracking *OpenTrackingSetting `json:"open_tracking,omitempty"` SubscriptionTracking *SubscriptionTrackingSetting `json:"subscription_tracking,omitempty"` GoogleAnalytics *GaSetting `json:"ganalytics,omitempty"` BCC *BccSetting `json:"bcc,omitempty"` BypassListManagement *Setting `json:"bypass_list_management,omitempty"` SandboxMode *SandboxModeSetting `json:"sandbox_mode,omitempty"` }
func NewTrackingSettings ¶
func NewTrackingSettings() *TrackingSettings
func (*TrackingSettings) SetClickTracking ¶
func (t *TrackingSettings) SetClickTracking(clickTracking *ClickTrackingSetting) *TrackingSettings
func (*TrackingSettings) SetGoogleAnalytics ¶
func (t *TrackingSettings) SetGoogleAnalytics(googleAnalytics *GaSetting) *TrackingSettings
func (*TrackingSettings) SetOpenTracking ¶
func (t *TrackingSettings) SetOpenTracking(openTracking *OpenTrackingSetting) *TrackingSettings
func (*TrackingSettings) SetSubscriptionTracking ¶
func (t *TrackingSettings) SetSubscriptionTracking(subscriptionTracking *SubscriptionTrackingSetting) *TrackingSettings
Click to show internal directories.
Click to hide internal directories.