Documentation
¶
Index ¶
- Constants
- func Bool(v bool) *bool
- func CheckResponse(r *http.Response) error
- func Int(v int) *int
- func Int64(v int64) *int64
- func String(v string) *string
- type ActivityData
- type ActivityEmail
- type ActivityOptions
- type ActivityRecipient
- type ActivityRoot
- type ActivityService
- type AnalyticsActivityRoot
- type AnalyticsData
- type AnalyticsOptions
- type AnalyticsService
- type AnalyticsStats
- type ApiQuotaRoot
- type ApiQuotaService
- type Attachment
- type AuthError
- type BulkEmailData
- type BulkEmailResponse
- type BulkEmailRoot
- type BulkEmailService
- type CatchFilter
- type CreateDomainOptions
- type CreateEmailVerificationOptions
- type CreateIdentityOptions
- type CreateInboundOptions
- type CreateSmsInboundOptions
- type CreateSmsWebhookOptions
- type CreateSuppressionBlockOptions
- type CreateSuppressionOptions
- type CreateTokenOptions
- type CreateWebhookOptions
- type CustomTracking
- type DeleteAll
- type DeleteSuppressionOptions
- type Dkim
- type Dns
- type DnsRoot
- type Domain
- type DomainRecipient
- type DomainRecipientRoot
- type DomainRoot
- type DomainService
- type DomainSettingOptions
- type DomainSettings
- type Email
- type EmailService
- type EmailVerification
- type EmailVerificationRoot
- type EmailVerificationService
- type ErrorResponse
- type Filter
- type Filters
- type Forwards
- type ForwardsFilter
- type From
- type GetEmailVerificationOptions
- type GetRecipientsOptions
- type Header
- type Identity
- type IdentityDomain
- type IdentityRoot
- type IdentityService
- type Inbound
- type InboundRoot
- type InboundRouting
- type InboundService
- type Links
- type ListDomainOptions
- type ListEmailVerificationOptions
- type ListIdentityOptions
- type ListInboundOptions
- type ListMessageOptions
- type ListRecipientOptions
- type ListScheduleMessageOptions
- type ListSmsInboundOptions
- type ListSmsMessageOptions
- type ListSmsWebhookOptions
- type ListTemplateOptions
- type ListWebhookOptions
- type Mailersend
- func (ms *Mailersend) APIKey() string
- func (ms *Mailersend) Client() *http.Client
- func (ms *Mailersend) NewMessage() *Messagedeprecated
- func (ms *Mailersend) Send(ctx context.Context, message *Message) (*Response, error)deprecated
- func (ms *Mailersend) SetAPIKey(apikey string)
- func (ms *Mailersend) SetClient(c *http.Client)
- type MatchFilter
- type Message
- func (m *Message) AddAttachment(attachment Attachment)
- func (m *Message) AddReference(reference string)
- func (m *Message) SetBcc(bcc []Recipient)
- func (m *Message) SetCc(cc []Recipient)
- func (m *Message) SetFrom(from From)
- func (m *Message) SetHTML(html string)
- func (m *Message) SetHeaders(headers []Header)
- func (m *Message) SetInReplyTo(inReplyTo string)
- func (m *Message) SetListUnsubscribe(listUnsubscribe string)
- func (m *Message) SetPersonalization(personalization []Personalization)
- func (m *Message) SetPrecedenceBulk(precedenceBulk bool)
- func (m *Message) SetRecipients(recipients []Recipient)
- func (m *Message) SetReferences(references []string)
- func (m *Message) SetReplyTo(replyTo Recipient)
- func (m *Message) SetSendAt(sendAt int64)
- func (m *Message) SetSettings(settings Settings)
- func (m *Message) SetSubject(subject string)
- func (m *Message) SetSubstitutions(variables []Variables)deprecated
- func (m *Message) SetTags(tags []string)
- func (m *Message) SetTemplateID(templateID string)
- func (m *Message) SetText(text string)
- type MessageData
- type MessageRoot
- type MessageService
- type Meta
- type Number
- type OpenData
- type OpenStats
- type OpensRoot
- type Personalization
- type Recipient
- type RecipientData
- type RecipientObject
- type RecipientRoot
- type RecipientService
- type ReplyTo
- type Response
- type Result
- type ResultEmailVerificationRoot
- type ResultSingleEmailVerification
- type ReturnPath
- type ScheduleDomain
- type ScheduleMessage
- type ScheduleMessageData
- type ScheduleMessageRoot
- type ScheduleMessageService
- type ScheduleMessageSingleData
- type ScheduleMessageSingleRoot
- type Settings
- type SingleDomainRoot
- type SingleEmailVerificationOptions
- type SingleEmailVerificationRoot
- type SingleIdentityRoot
- type SingleInboundRoot
- type SingleMessage
- type SingleMessageRoot
- type SingleRecipientRoot
- type SingleSmsInboundRoot
- type SingleSmsNumberRoot
- type SingleSmsRecipientRoot
- type SingleSmsRecipientUpdateRoot
- type SingleSmsWebhookRoot
- type SingleTemplate
- type SingleTemplateRoot
- type SingleWebhookRoot
- type Sms
- type SmsActivityData
- type SmsActivityOptions
- type SmsActivityService
- type SmsInbound
- type SmsInboundRoot
- type SmsInboundService
- type SmsListActivityRoot
- type SmsListMessagesRoot
- type SmsMessage
- type SmsMessageData
- type SmsMessageRoot
- type SmsMessageService
- type SmsNumberOptions
- type SmsNumberRoot
- type SmsNumberService
- type SmsNumberSettingOptions
- type SmsPersonalization
- type SmsRecipient
- type SmsRecipientData
- type SmsRecipientDataUpdate
- type SmsRecipientOptions
- type SmsRecipientRoot
- type SmsRecipientService
- type SmsRecipientSettingOptions
- type SmsService
- type SmsSingleMessagesRoot
- type SmsWebhook
- type SmsWebhookRoot
- type SmsWebhookService
- type Spf
- type Statistics
- type Status
- type Substitutiondeprecated
- type SuppressionBlockData
- type SuppressionBlockListData
- type SuppressionBlockListRoot
- type SuppressionBlockResponse
- type SuppressionHardBouncesData
- type SuppressionHardBouncesRoot
- type SuppressionOptions
- type SuppressionRecipient
- type SuppressionService
- type SuppressionSpamComplaintsData
- type SuppressionSpamComplaintsRoot
- type SuppressionUnsubscribesData
- type SuppressionUnsubscribesRoot
- type Template
- type TemplateRoot
- type TemplateService
- type TemplateStats
- type Token
- type TokenRoot
- type TokenService
- type UpdateIdentityOptions
- type UpdateInboundOptions
- type UpdateSmsInboundOptions
- type UpdateSmsWebhookOptions
- type UpdateTokenOptions
- type UpdateWebhookOptions
- type Variablesdeprecated
- type Verify
- type VerifyRoot
- type Webhook
- type WebhookRoot
- type WebhookService
Constants ¶
const ( DispositionInline = "inline" DispositionAttachment = "attachment" )
const ( EventActivitySent = "activity.sent" // Fired when your email is sent from our sending servers. EventActivityDelivered = "activity.delivered" // Fired when your email is successfully delivered with no errors. EventActivitySoftBounced = "activity.soft_bounced" // Fired when your email is not delivered because it soft bounced. EventActivityHardBounced = "activity.hard_bounced" // Fired when your email is not delivered. EventActivityOpened = "activity.opened" // Fired when the recipient receives your email and opens it. EventActivityOpenedUnique = "activity.opened_unique" // Fired when the recipient receives your email and opens it only for the first time. EventActivityClicked = "activity.clicked" // Fired when the recipient clicks a link in your email. EventActivityClickedUnique = "activity.clicked_unique" // Fired when the recipient clicks a link in your email only for the first time. EventActivityUnsubscribed = "activity.unsubscribed" // Fired when the recipient unsubscribes from your emails. EventActivitySpamComplaint = "activity.spam_complaint" // Fired when the recipient marks your emails as spam or junk. EventActivitySurveyOpened = "activity.survey_opened" // Fired when the recipient opens an email containing a survey for the first time. EventActivitySurveySubmitted = "activity.survey_submitted" // Fired when the recipient answers all available questions in a survey-based email or after an idle time of 30 minutes. )
Activity-related event constants
const ( EventMaintenanceStart = "maintenance.start" // Fired when the maintenance period begins. EventMaintenanceEnd = "maintenance.end" // Fired when the maintenance period ends. )
Maintenance-related event constants
const ( BlockList string = "blocklist" HardBounces string = "hard-bounces" SpamComplaints string = "spam-complaints" Unsubscribes string = "unsubscribes" )
const APIBase string = "https://api.mailersend.com/v1"
const (
EventInboundForwardFailed = "inbound_forward.failed" // Fired when an inbound message fails to forward.
)
Inbound forward-related event constants
const (
EventSenderIdentityVerified = "sender_identity.verified" // Fired when the sender identity has been successfully verified.
)
Sender identity-related event constants
Variables ¶
This section is empty.
Functions ¶
func Bool ¶ added in v1.1.0
Bool is a helper routine that allocates a new bool value to store v and returns a pointer to it.
func CheckResponse ¶ added in v1.1.0
CheckResponse checks the API response for errors, and returns them if present. A response is considered an error if it has a status code outside the 200 range or equal to 202 Accepted.
func Int ¶ added in v1.1.0
Int is a helper routine that allocates a new int value to store v and returns a pointer to it.
Types ¶
type ActivityData ¶ added in v1.6.0
type ActivityData struct { ID string `json:"id"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` Type string `json:"type"` Email ActivityEmail `json:"email"` }
type ActivityEmail ¶ added in v1.6.0
type ActivityEmail struct { ID string `json:"id"` From string `json:"from"` Subject string `json:"subject"` Text string `json:"text"` HTML string `json:"html"` Status string `json:"status"` Tags interface{} `json:"tags"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` Recipient ActivityRecipient `json:"recipient"` }
type ActivityOptions ¶ added in v1.1.0
type ActivityOptions struct { DomainID string `url:"-"` Page int `url:"page,omitempty"` DateFrom int64 `url:"date_from,omitempty"` DateTo int64 `url:"date_to,omitempty"` Limit int `url:"limit,omitempty"` Event []string `url:"event[],omitempty"` }
ActivityOptions - modifies the behavior of ActivityService.List method
type ActivityRecipient ¶ added in v1.6.0
type ActivityRoot ¶ added in v1.6.0
type ActivityRoot struct { Data []ActivityData `json:"data"` Links Links `json:"links"` Meta Meta `json:"meta"` }
activityRoot - format of activity response
type ActivityService ¶ added in v1.1.0
type ActivityService interface {
List(ctx context.Context, options *ActivityOptions) (*ActivityRoot, *Response, error)
}
type AnalyticsActivityRoot ¶ added in v1.6.0
type AnalyticsActivityRoot struct {
Data AnalyticsData `json:"data"`
}
AnalyticsActivityRoot - format of analytics response
type AnalyticsData ¶ added in v1.6.0
type AnalyticsData struct { DateFrom string `json:"date_from"` DateTo string `json:"date_to"` GroupBy string `json:"group_by"` Stats []AnalyticsStats `json:"stats"` }
type AnalyticsOptions ¶ added in v1.1.0
type AnalyticsOptions struct { DomainID string `url:"domain_id,omitempty"` RecipientID []int64 `url:"recipient_id,omitempty"` DateFrom int64 `url:"date_from"` DateTo int64 `url:"date_to"` GroupBy string `url:"group_by,omitempty"` Tags []string `url:"tags[],omitempty"` Event []string `url:"event[],omitempty"` }
AnalyticsOptions - modifies the behavior of AnalyticsService methods
type AnalyticsService ¶ added in v1.1.0
type AnalyticsService interface { GetActivityByDate(ctx context.Context, options *AnalyticsOptions) (*AnalyticsActivityRoot, *Response, error) GetOpensByCountry(ctx context.Context, options *AnalyticsOptions) (*OpensRoot, *Response, error) GetOpensByUserAgent(ctx context.Context, options *AnalyticsOptions) (*OpensRoot, *Response, error) GetOpensByReadingEnvironment(ctx context.Context, options *AnalyticsOptions) (*OpensRoot, *Response, error) }
type AnalyticsStats ¶ added in v1.6.0
type AnalyticsStats struct { Date string `json:"date"` Queued int `json:"queued,omitempty"` Sent int `json:"sent,omitempty"` Delivered int `json:"delivered,omitempty"` SoftBounced int `json:"soft_bounced,omitempty"` HardBounced int `json:"hard_bounced,omitempty"` Junk int `json:"junk,omitempty"` Opened int `json:"opened,omitempty"` Clicked int `json:"clicked,omitempty"` Unsubscribed int `json:"unsubscribed,omitempty"` SpamComplaints int `json:"spam_complaints,omitempty"` }
type ApiQuotaRoot ¶ added in v1.6.0
type ApiQuotaService ¶ added in v1.3.3
type ApiQuotaService interface {
Get(ctx context.Context) (*ApiQuotaRoot, *Response, error)
}
type Attachment ¶ added in v1.1.0
type Attachment struct { Content string `json:"content"` Filename string `json:"filename"` Disposition string `json:"disposition,omitempty"` ID string `json:"id,omitempty"` }
Attachment - you can set multiple Attachments
type AuthError ¶ added in v1.1.0
type AuthError ErrorResponse
AuthError occurs when using HTTP Authentication fails
type BulkEmailData ¶ added in v1.6.0
type BulkEmailData struct { ID string `json:"id"` State string `json:"state"` TotalRecipientsCount int `json:"total_recipients_count"` SuppressedRecipientsCount int `json:"suppressed_recipients_count"` SuppressedRecipients interface{} `json:"suppressed_recipients"` ValidationErrorsCount int `json:"validation_errors_count"` ValidationErrors interface{} `json:"validation_errors"` MessagesID []string `json:"messages_id"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
type BulkEmailResponse ¶ added in v1.6.0
type BulkEmailRoot ¶ added in v1.6.0
type BulkEmailRoot struct {
Data BulkEmailData `json:"data"`
}
type BulkEmailService ¶ added in v1.1.3
type CatchFilter ¶ added in v1.1.5
type CreateDomainOptions ¶ added in v1.1.2
type CreateEmailVerificationOptions ¶ added in v1.2.1
type CreateEmailVerificationOptions struct { Name string `json:"name"` Emails []string `json:"emails"` }
CreateEmailVerificationOptions - modifies the behavior of emailVerificationService.Create Method
type CreateIdentityOptions ¶ added in v1.3.1
type CreateInboundOptions ¶ added in v1.1.5
type CreateInboundOptions struct { DomainID string `json:"domain_id"` Name string `json:"name"` DomainEnabled bool `json:"domain_enabled"` InboundDomain string `json:"inbound_domain,omitempty"` InboundAddress string `json:"inbound_address,omitempty"` InboundSubdomain string `json:"inbound_subdomain,omitempty"` InboundPriority int `json:"inbound_priority,omitempty"` MatchFilter *MatchFilter `json:"match_filter,omitempty"` CatchFilter *CatchFilter `json:"catch_filter,omitempty"` Forwards []ForwardsFilter `json:"forwards"` }
CreateInboundOptions - the Options to set when creating an inbound resource
type CreateSmsInboundOptions ¶ added in v1.1.9
type CreateSmsInboundOptions struct { SmsNumberId string `json:"sms_number_id"` Name string `json:"name"` ForwardUrl string `json:"forward_url"` Filter Filter `json:"filter"` Enabled *bool `json:"enabled"` }
CreateSmsInboundOptions - modifies the behavior of *WebhookService.Create Method
type CreateSmsWebhookOptions ¶ added in v1.1.9
type CreateSmsWebhookOptions struct { SmsNumberId string `json:"sms_number_id"` Name string `json:"name"` URL string `json:"url"` Enabled *bool `json:"enabled,omitempty"` Events []string `json:"events"` }
CreateSmsWebhookOptions - modifies the behavior of *WebhookService.Create Method
type CreateSuppressionBlockOptions ¶ added in v1.1.1
type CreateSuppressionOptions ¶ added in v1.1.1
type CreateTokenOptions ¶ added in v1.1.0
type CreateTokenOptions struct { Name string `json:"name"` DomainID string `json:"domain_id"` Scopes []string `json:"scopes"` }
CreateTokenOptions - modifies the behavior of TokenService.Create Method
type CreateWebhookOptions ¶ added in v1.1.0
type CreateWebhookOptions struct { Name string `json:"name"` DomainID string `json:"domain_id"` URL string `json:"url"` Enabled *bool `json:"enabled,omitempty"` Events []string `json:"events"` }
CreateWebhookOptions - modifies the behavior of *WebhookService.Create Method
type CustomTracking ¶ added in v1.1.2
type DeleteSuppressionOptions ¶ added in v1.1.1
type Dns ¶ added in v1.6.0
type Dns struct { ID string `json:"id"` Spf Spf `json:"spf"` Dkim Dkim `json:"dkim"` ReturnPath ReturnPath `json:"return_path"` CustomTracking CustomTracking `json:"custom_tracking"` InboundRouting InboundRouting `json:"inbound_routing"` }
type Domain ¶ added in v1.1.0
type Domain struct { ID string `json:"id"` Name string `json:"name"` Dkim bool `json:"dkim"` Spf bool `json:"spf"` Tracking bool `json:"tracking"` IsVerified bool `json:"is_verified"` IsCnameVerified bool `json:"is_cname_verified"` IsDNSActive bool `json:"is_dns_active"` IsCnameActive bool `json:"is_cname_active"` IsTrackingAllowed bool `json:"is_tracking_allowed"` HasNotQueuedMessages bool `json:"has_not_queued_messages"` NotQueuedMessagesCount int `json:"not_queued_messages_count"` DomainSettings DomainSettings `json:"domain_settings"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` }
type DomainRecipient ¶ added in v1.6.0
type DomainRecipient struct { ID string `json:"id"` Email string `json:"email"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` DeletedAt string `json:"deleted_at"` }
DomainRecipient list of domain recipients
type DomainRecipientRoot ¶ added in v1.6.0
type DomainRecipientRoot struct { Data []DomainRecipient `json:"data"` Links Links `json:"links"` Meta Meta `json:"meta"` }
DomainRecipientRoot format of domain response
type DomainRoot ¶ added in v1.6.0
type DomainRoot struct { Data []Domain `json:"data"` Links Links `json:"links"` Meta Meta `json:"meta"` }
DomainRoot format of domain response
type DomainService ¶ added in v1.1.0
type DomainService interface { List(ctx context.Context, options *ListDomainOptions) (*DomainRoot, *Response, error) Get(ctx context.Context, domainID string) (*SingleDomainRoot, *Response, error) Update(ctx context.Context, options *DomainSettingOptions) (*SingleDomainRoot, *Response, error) Delete(ctx context.Context, domainID string) (*Response, error) Create(ctx context.Context, options *CreateDomainOptions) (*SingleDomainRoot, *Response, error) GetDNS(ctx context.Context, domainID string) (*DnsRoot, *Response, error) Verify(ctx context.Context, domainID string) (*VerifyRoot, *Response, error) GetRecipients(ctx context.Context, options *GetRecipientsOptions) (*DomainRecipientRoot, *Response, error) }
type DomainSettingOptions ¶ added in v1.1.0
type DomainSettingOptions struct { DomainID string `json:"-"` SendPaused *bool `json:"send_paused,omitempty"` TrackClicks *bool `json:"track_clicks,omitempty"` TrackOpens *bool `json:"track_opens,omitempty"` TrackUnsubscribe *bool `json:"track_unsubscribe,omitempty"` TrackUnsubscribeHTML string `json:"track_unsubscribe_html,omitempty"` TrackUnsubscribePlain string `json:"track_unsubscribe_plain,omitempty"` TrackContent *bool `json:"track_content,omitempty"` CustomTrackingEnabled *bool `json:"custom_tracking_enabled,omitempty"` CustomTrackingSubdomain string `json:"custom_tracking_subdomain,omitempty"` IgnoreDuplicatedRecipients *bool `json:"ignore_duplicated_recipients,omitempty"` PrecedenceBulk *bool `json:"precedence_bulk,omitempty"` }
DomainSettingOptions - modifies the behavior of domainService.Update Method
type DomainSettings ¶ added in v1.1.0
type DomainSettings struct { SendPaused bool `json:"send_paused,omitempty"` TrackClicks bool `json:"track_clicks,omitempty"` TrackOpens bool `json:"track_opens,omitempty"` TrackUnsubscribe bool `json:"track_unsubscribe,omitempty"` TrackUnsubscribeHTML string `json:"track_unsubscribe_html,omitempty"` TrackUnsubscribePlain string `json:"track_unsubscribe_plain,omitempty"` TrackContent bool `json:"track_content,omitempty"` CustomTrackingEnabled bool `json:"custom_tracking_enabled,omitempty"` CustomTrackingSubdomain string `json:"custom_tracking_subdomain,omitempty"` IgnoreDuplicatedRecipients bool `json:"ignore_duplicated_recipients,omitempty"` PrecedenceBulk bool `json:"precedence_bulk,omitempty"` }
type Email ¶ added in v1.6.0
type Email struct { ID string `json:"id"` From string `json:"from"` Subject string `json:"subject,omitempty"` Text string `json:"text,omitempty"` HTML string `json:"html,omitempty"` Tags []string `json:"tags,omitempty"` Status string `json:"status,omitempty"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
type EmailService ¶ added in v1.1.0
type EmailVerification ¶ added in v1.6.0
type EmailVerification struct { Id string `json:"id"` Name string `json:"name"` Total int `json:"total"` VerificationStarted interface{} `json:"verification_started"` VerificationEnded interface{} `json:"verification_ended"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` Status Status `json:"status"` Source string `json:"source"` Statistics Statistics `json:"statistics"` }
type EmailVerificationRoot ¶ added in v1.6.0
type EmailVerificationRoot struct { Data []EmailVerification `json:"data"` Links Links `json:"links"` Meta Meta `json:"meta"` }
EmailVerificationRoot format of verification response
type EmailVerificationService ¶ added in v1.2.1
type EmailVerificationService interface { List(ctx context.Context, options *ListEmailVerificationOptions) (*EmailVerificationRoot, *Response, error) Get(ctx context.Context, emailVerificationId string) (*SingleEmailVerificationRoot, *Response, error) Update(ctx context.Context, options *DomainSettingOptions) (*SingleEmailVerificationRoot, *Response, error) Delete(ctx context.Context, domainID string) (*Response, error) Create(ctx context.Context, options *CreateEmailVerificationOptions) (*SingleEmailVerificationRoot, *Response, error) Verify(ctx context.Context, emailVerificationId string) (*SingleEmailVerificationRoot, *Response, error) VerifySingle(ctx context.Context, options *SingleEmailVerificationOptions) (*ResultSingleEmailVerification, *Response, error) GetResults(ctx context.Context, options *GetEmailVerificationOptions) (*ResultEmailVerificationRoot, *Response, error) }
type ErrorResponse ¶ added in v1.1.0
type ErrorResponse struct { Response *http.Response // HTTP response that caused this error Message string `json:"message"` // error message }
func (*ErrorResponse) Error ¶ added in v1.1.0
func (r *ErrorResponse) Error() string
type Filter ¶ added in v1.1.9
type Filter struct { Comparer string `json:"comparer"` Value string `json:"value"` Key string `json:"key,omitempty"` }
Filter - used to filter resources
type ForwardsFilter ¶ added in v1.6.0
type GetEmailVerificationOptions ¶ added in v1.2.1
type GetEmailVerificationOptions struct { EmailVerificationId string `url:"-"` Page int `url:"page,omitempty"` Limit int `url:"limit,omitempty"` }
GetEmailVerificationOptions - modifies the behavior of emailVerificationService.List and emailVerificationService.GetResult Method
type GetRecipientsOptions ¶ added in v1.1.0
type GetRecipientsOptions struct { DomainID string `url:"-"` Page int `url:"page,omitempty"` Limit int `url:"limit,omitempty"` }
GetRecipientsOptions - modifies the behavior of domainService.GetRecipients Method
type Identity ¶ added in v1.6.0
type Identity struct { ID string `json:"id"` Email string `json:"email"` Name string `json:"name"` ReplyToEmail interface{} `json:"reply_to_email"` ReplyToName interface{} `json:"reply_to_name"` IsVerified bool `json:"is_verified"` Resends int `json:"resends"` AddNote bool `json:"add_note"` PersonalNote interface{} `json:"personal_note"` Domain IdentityDomain `json:"domain"` }
type IdentityDomain ¶ added in v1.6.0
type IdentityRoot ¶ added in v1.6.0
type IdentityRoot struct { Data []Identity `json:"data"` Links Links `json:"links"` Meta Meta `json:"meta"` }
IdentityRoot - format of identity response
type IdentityService ¶ added in v1.3.1
type IdentityService interface { List(ctx context.Context, options *ListIdentityOptions) (*IdentityRoot, *Response, error) Get(ctx context.Context, identityID string) (*SingleIdentityRoot, *Response, error) GetByEmail(ctx context.Context, identityEmail string) (*SingleIdentityRoot, *Response, error) Create(ctx context.Context, options *CreateIdentityOptions) (*SingleIdentityRoot, *Response, error) Update(ctx context.Context, identityID string, options *UpdateIdentityOptions) (*SingleIdentityRoot, *Response, error) UpdateByEmail(ctx context.Context, identityEmail string, options *UpdateIdentityOptions) (*SingleIdentityRoot, *Response, error) Delete(ctx context.Context, identityID string) (*Response, error) DeleteByEmail(ctx context.Context, identityEmail string) (*Response, error) }
type Inbound ¶ added in v1.6.0
type Inbound struct { ID string `json:"id"` Name string `json:"name"` Address string `json:"address"` Domain string `json:"domain"` DNSCheckedAt interface{} `json:"dns_checked_at"` Priority int `json:"priority"` Enabled bool `json:"enabled"` Filters []Filters `json:"filters"` Forwards []Forwards `json:"forwards"` MxValues mxValues `json:"mxValues"` }
type InboundRoot ¶ added in v1.6.0
type InboundRoot struct { Data []Inbound `json:"data"` Links Links `json:"links"` Meta Meta `json:"meta"` }
InboundRoot - format of webhook response
type InboundRouting ¶ added in v1.1.2
type InboundService ¶ added in v1.1.5
type InboundService interface { List(ctx context.Context, options *ListInboundOptions) (*InboundRoot, *Response, error) Get(ctx context.Context, inboundID string) (*SingleInboundRoot, *Response, error) Create(ctx context.Context, options *CreateInboundOptions) (*SingleInboundRoot, *Response, error) Update(ctx context.Context, inboundID string, options *UpdateInboundOptions) (*SingleInboundRoot, *Response, error) Delete(ctx context.Context, inboundID string) (*Response, error) }
type Links ¶ added in v1.1.0
type Links struct { First string `json:"first"` Last string `json:"last"` Prev string `json:"prev"` Next string `json:"next"` }
Links - used for api responses
type ListDomainOptions ¶ added in v1.1.0
type ListDomainOptions struct { Page int `url:"page,omitempty"` Limit int `url:"limit,omitempty"` Verified *bool `url:"verified,omitempty"` }
ListDomainOptions - modifies the behavior of domainService.List Method
type ListEmailVerificationOptions ¶ added in v1.2.1
type ListEmailVerificationOptions struct { Page int `url:"page,omitempty"` Limit int `url:"limit,omitempty"` }
ListEmailVerificationOptions - modifies the behavior of emailVerificationService.List Method
type ListIdentityOptions ¶ added in v1.3.1
type ListIdentityOptions struct { DomainID string `url:"domain_id"` Page int `url:"page,omitempty"` Limit int `url:"limit,omitempty"` }
ListIdentityOptions - modifies the behavior of *IdentityService.List Method
type ListInboundOptions ¶ added in v1.1.5
type ListInboundOptions struct { DomainID string `url:"domain_id"` Page int `url:"page,omitempty"` Limit int `url:"limit,omitempty"` }
ListInboundOptions - modifies the behavior of *inboundService.List Method
type ListMessageOptions ¶ added in v1.1.0
type ListMessageOptions struct { Page int `url:"page,omitempty"` Limit int `url:"limit,omitempty"` }
ListMessageOptions - modifies the behavior of MessageService.List Method
type ListRecipientOptions ¶ added in v1.1.0
type ListRecipientOptions struct { DomainID string `url:"domain_id,omitempty"` Page int `url:"page,omitempty"` Limit int `url:"limit,omitempty"` }
ListRecipientOptions - modifies the behavior of RecipientService.List method
type ListScheduleMessageOptions ¶ added in v1.1.7
type ListScheduleMessageOptions struct { DomainID string `url:"domain_id,omitempty"` Status string `url:"status,omitempty"` Page int `url:"page,omitempty"` Limit int `url:"limit,omitempty"` }
ListScheduleMessageOptions - modifies the behavior of MessageService.List Method
type ListSmsInboundOptions ¶ added in v1.1.9
type ListSmsInboundOptions struct { SmsNumberId string `url:"sms_number_id,omitempty"` Enabled *bool `url:"enabled,omitempty"` Page int `url:"page,omitempty"` Limit int `url:"limit,omitempty"` }
ListSmsInboundOptions - modifies the behavior of SmsNumbersService.List method
type ListSmsMessageOptions ¶ added in v1.1.9
type ListSmsMessageOptions struct { Page int `url:"page,omitempty"` Limit int `url:"limit,omitempty"` }
ListSmsMessageOptions - modifies the behavior of SmsMessagesService.List method
type ListSmsWebhookOptions ¶ added in v1.1.9
type ListSmsWebhookOptions struct { SmsNumberId string `url:"sms_number_id,omitempty"` Page int `url:"page,omitempty"` Limit int `url:"limit,omitempty"` }
ListSmsWebhookOptions - modifies the behavior of SmsNumbersService.List method
type ListTemplateOptions ¶ added in v1.1.0
type ListTemplateOptions struct { DomainID string `url:"domain_id,omitempty"` Page int `url:"page,omitempty"` Limit int `url:"limit,omitempty"` }
ListTemplateOptions - modifies the behavior of TemplateService.List Method
type ListWebhookOptions ¶ added in v1.1.0
type ListWebhookOptions struct { DomainID string `url:"domain_id"` Limit int `url:"limit,omitempty"` }
ListWebhookOptions - modifies the behavior of *WebhookService.List Method
type Mailersend ¶
type Mailersend struct { // Services Activity ActivityService Analytics AnalyticsService Domain DomainService Email EmailService BulkEmail BulkEmailService Message MessageService ScheduleMessage ScheduleMessageService Recipient RecipientService Template TemplateService Token TokenService Webhook WebhookService Suppression SuppressionService Inbound InboundService Sms SmsService SmsActivity SmsActivityService SmsNumber SmsNumberService SmsRecipient SmsRecipientService SmsWebhook SmsWebhookService SmsMessage SmsMessageService SmsInbound SmsInboundService EmailVerification EmailVerificationService Identity IdentityService ApiQuota ApiQuotaService // contains filtered or unexported fields }
Mailersend - base mailersend api client
func NewMailersend ¶
func NewMailersend(apiKey string) *Mailersend
NewMailersend - creates a new client instance.
func (*Mailersend) APIKey ¶
func (ms *Mailersend) APIKey() string
APIKey - Get api key after it has been created
func (*Mailersend) Client ¶
func (ms *Mailersend) Client() *http.Client
Client - Get the current client
func (*Mailersend) NewMessage
deprecated
func (ms *Mailersend) NewMessage() *Message
Deprecated: NewMessage - Setup a new message ready to be sent
func (*Mailersend) SetAPIKey ¶ added in v1.1.2
func (ms *Mailersend) SetAPIKey(apikey string)
SetAPIKey - Set the client api key
func (*Mailersend) SetClient ¶
func (ms *Mailersend) SetClient(c *http.Client)
SetClient - Set the client if you want more control over the client implementation
type MatchFilter ¶ added in v1.1.5
type MatchFilter struct {
Type string `json:"type,omitempty"`
}
type Message ¶
type Message struct { Recipients []Recipient `json:"to"` From From `json:"from"` CC []Recipient `json:"cc,omitempty"` Bcc []Recipient `json:"bcc,omitempty"` ReplyTo ReplyTo `json:"reply_to,omitempty"` InReplyTo string `json:"in_reply_to,omitempty"` Subject string `json:"subject,omitempty"` Text string `json:"text,omitempty"` HTML string `json:"html,omitempty"` TemplateID string `json:"template_id,omitempty"` SendAt int64 `json:"send_at,omitempty"` Tags []string `json:"tags,omitempty"` Attachments []Attachment `json:"attachments,omitempty"` TemplateVariables []Variables `json:"variables"` Personalization []Personalization `json:"personalization"` Headers []Header `json:"headers"` ListUnsubscribe string `json:"list_unsubscribe"` PrecedenceBulk bool `json:"precedence_bulk,omitempty"` References []string `json:"references,omitempty"` Settings Settings `json:"settings,omitempty"` }
Message structures contain both the message text and the envelop for an e-mail message.
func (*Message) AddAttachment ¶ added in v1.1.0
func (m *Message) AddAttachment(attachment Attachment)
AddAttachment - Add an attachment base64 encoded content.
func (*Message) AddReference ¶ added in v1.6.1
AddReference - Add a reference
func (*Message) SetHTML ¶
SetHTML - Set the html content of the email, required if not using a template.
func (*Message) SetHeaders ¶ added in v1.6.0
SetHeaders - Set the custom headers.
func (*Message) SetInReplyTo ¶ added in v1.3.0
SetInReplyTo - Set InReplyTo.
func (*Message) SetListUnsubscribe ¶ added in v1.6.0
SetListUnsubscribe - Set the custom list unsubscribe header (Professional and Enterprise accounts only)
func (*Message) SetPersonalization ¶ added in v1.0.4
func (m *Message) SetPersonalization(personalization []Personalization)
SetPersonalization - Set the template personalization.
func (*Message) SetPrecedenceBulk ¶ added in v1.6.1
SetPrecedenceBulk - Set precedence_bulk
func (*Message) SetRecipients ¶
SetRecipients - Set all the recipients.
func (*Message) SetReferences ¶ added in v1.6.1
SetReferences - Set references
func (*Message) SetReplyTo ¶ added in v1.1.4
SetReplyTo - Set ReplyTo.
func (*Message) SetSettings ¶ added in v1.6.1
SetSettings - Set settings
func (*Message) SetSubject ¶
SetSubject - Set the subject of the email, required if not using a template.
func (*Message) SetSubstitutions
deprecated
func (*Message) SetTemplateID ¶
SetTemplateID - Set the template ID.
type MessageData ¶ added in v1.6.0
type MessageRoot ¶ added in v1.6.0
type MessageRoot struct { Data []MessageData `json:"data"` Links Links `json:"links"` Meta Meta `json:"meta"` }
MessageRoot format of message response
type MessageService ¶ added in v1.1.0
type MessageService interface { List(ctx context.Context, options *ListMessageOptions) (*MessageRoot, *Response, error) Get(ctx context.Context, messageID string) (*SingleMessageRoot, *Response, error) }
type Meta ¶ added in v1.1.0
type Meta struct { CurrentPage json.Number `json:"current_page"` From json.Number `json:"from"` Path string `json:"path"` PerPage json.Number `json:"per_page"` To json.Number `json:"to"` }
Meta - used for api responses
type Personalization ¶ added in v1.0.4
type Personalization struct { Email string `json:"email"` Data map[string]interface{} `json:"data"` }
Personalization - you can set multiple Personalization for each Recipient
type RecipientData ¶ added in v1.6.0
type RecipientObject ¶ added in v1.6.0
type RecipientObject struct { ID string `json:"id"` Email string `json:"email"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` DeletedAt string `json:"deleted_at"` }
RecipientObject - a single RecipientObject
type RecipientRoot ¶ added in v1.6.0
type RecipientRoot struct { Data []RecipientObject `json:"data"` Links Links `json:"links"` Meta Meta `json:"meta"` }
RecipientRoot - recipients response
type RecipientService ¶ added in v1.1.0
type ReplyTo ¶ added in v1.1.4
type ReplyTo = Recipient
ReplyTo - simple struct to declare from name/ email
type Response ¶ added in v1.1.0
Response is a Mailersend API response. This wraps the standard http.Response returned from Mailersend and provides convenient access to things like pagination links.
type ResultEmailVerificationRoot ¶ added in v1.6.0
type ResultSingleEmailVerification ¶ added in v1.6.0
type ResultSingleEmailVerification struct {
Status string `json:"status"`
}
type ReturnPath ¶ added in v1.1.2
type ScheduleDomain ¶ added in v1.1.7
type ScheduleMessage ¶ added in v1.1.7
type ScheduleMessageData ¶ added in v1.6.0
type ScheduleMessageRoot ¶ added in v1.6.0
type ScheduleMessageRoot struct { Data []ScheduleMessageData `json:"data"` Links Links `json:"links"` Meta Meta `json:"meta"` }
type ScheduleMessageService ¶ added in v1.1.7
type ScheduleMessageService interface { List(ctx context.Context, options *ListScheduleMessageOptions) (*ScheduleMessageRoot, *Response, error) Get(ctx context.Context, messageID string) (*ScheduleMessageSingleRoot, *Response, error) Delete(ctx context.Context, messageID string) (*Response, error) }
type ScheduleMessageSingleData ¶ added in v1.6.0
type ScheduleMessageSingleData struct { MessageID string `json:"message_id"` Subject string `json:"subject"` SendAt time.Time `json:"send_at"` Status string `json:"status"` StatusMessage interface{} `json:"status_message"` CreatedAt time.Time `json:"created_at"` Domain ScheduleDomain `json:"domain"` Message ScheduleMessage `json:"message"` }
type ScheduleMessageSingleRoot ¶ added in v1.6.0
type ScheduleMessageSingleRoot struct {
Data ScheduleMessageSingleData `json:"data"`
}
type Settings ¶ added in v1.6.1
type Settings struct { TrackClicks bool `json:"track_clicks"` TrackOpens bool `json:"track_opens"` TrackContent bool `json:"track_content"` }
Settings - you can set email Settings
type SingleDomainRoot ¶ added in v1.6.0
type SingleDomainRoot struct {
Data Domain `json:"data"`
}
SingleDomainRoot format of domain response
type SingleEmailVerificationOptions ¶ added in v1.5.1
type SingleEmailVerificationOptions struct {
Email string `json:"email"`
}
type SingleEmailVerificationRoot ¶ added in v1.6.0
type SingleEmailVerificationRoot struct {
Data EmailVerification `json:"data"`
}
singleDomainRoot format of single verification response
type SingleIdentityRoot ¶ added in v1.6.0
type SingleIdentityRoot struct {
Data Identity `json:"data"`
}
SingleIdentityRoot - format of inbound response
type SingleInboundRoot ¶ added in v1.6.0
type SingleInboundRoot struct {
Data Inbound `json:"data"`
}
SingleInboundRoot - format of Inbound response
type SingleMessage ¶ added in v1.6.0
type SingleMessageRoot ¶ added in v1.6.0
type SingleMessageRoot struct {
Data SingleMessage `json:"data"`
}
type SingleRecipientRoot ¶ added in v1.6.0
type SingleRecipientRoot struct {
Data RecipientData `json:"data"`
}
SingleRecipientRoot - single recipient response
type SingleSmsInboundRoot ¶ added in v1.6.0
type SingleSmsInboundRoot struct {
Data SmsInbound `json:"data"`
}
SingleSmsInboundRoot - format of activity response
type SingleSmsNumberRoot ¶ added in v1.6.0
type SingleSmsNumberRoot struct {
Data Number `json:"data"`
}
SingleSmsNumberRoot - format of activity response
type SingleSmsRecipientRoot ¶ added in v1.6.0
type SingleSmsRecipientRoot struct {
Data SmsRecipientData `json:"data"`
}
singleSmsNumberRoot - format of activity response
type SingleSmsRecipientUpdateRoot ¶ added in v1.6.0
type SingleSmsRecipientUpdateRoot struct {
Data SmsRecipientDataUpdate `json:"data"`
}
SingleSmsRecipientUpdateRoot - format of activity response
type SingleSmsWebhookRoot ¶ added in v1.6.0
type SingleSmsWebhookRoot struct {
Data SmsWebhook `json:"data"`
}
singleSmsNumberRoot - format of activity response
type SingleTemplate ¶ added in v1.6.0
type SingleTemplate struct { ID string `json:"id"` Name string `json:"name"` Type string `json:"type"` ImagePath string `json:"image_path"` CreatedAt time.Time `json:"created_at"` Category interface{} `json:"category"` Domain Domain `json:"domain"` TemplateStats TemplateStats `json:"template_stats"` }
type SingleTemplateRoot ¶ added in v1.6.0
type SingleTemplateRoot struct {
Data SingleTemplate `json:"data"`
}
type SingleWebhookRoot ¶ added in v1.6.0
type SingleWebhookRoot struct {
Data Webhook `json:"data"`
}
SingleWebhookRoot - format of webhook response
type Sms ¶ added in v1.1.8
type Sms struct { From string `json:"from"` To []string `json:"to"` Text string `json:"text"` Personalization []SmsPersonalization `json:"personalization,omitempty"` }
func (*Sms) SetPersonalization ¶ added in v1.2.0
func (m *Sms) SetPersonalization(personalization []SmsPersonalization)
SetPersonalization - Set the template personalization.
type SmsActivityData ¶ added in v1.6.0
type SmsActivityData struct { From string `json:"from"` To string `json:"to"` CreatedAt time.Time `json:"created_at"` Status string `json:"status"` SmsMessageId string `json:"sms_message_id"` }
SmsActivityData - format of sms activity data
type SmsActivityOptions ¶ added in v1.1.8
type SmsActivityOptions struct { SmsNumberId string `url:"sms_number_id,omitempty"` Status []string `url:"status[],omitempty"` Page int `url:"page,omitempty"` DateFrom int64 `url:"date_from,omitempty"` DateTo int64 `url:"date_to,omitempty"` Limit int `url:"limit,omitempty"` }
SmsActivityOptions - modifies the behavior of SmsService.Activity method
type SmsActivityService ¶ added in v1.1.8
type SmsActivityService interface { List(ctx context.Context, options *SmsActivityOptions) (*SmsListActivityRoot, *Response, error) Get(ctx context.Context, smsMessageID string) (*SmsMessageRoot, *Response, error) }
type SmsInbound ¶ added in v1.6.0
type SmsInboundRoot ¶ added in v1.6.0
type SmsInboundRoot struct { Data []SmsInbound `json:"data"` Links Links `json:"links"` Meta Meta `json:"meta"` }
SmsInboundRoot - format of activity response
type SmsInboundService ¶ added in v1.1.9
type SmsInboundService interface { List(ctx context.Context, options *ListSmsInboundOptions) (*SmsInboundRoot, *Response, error) Get(ctx context.Context, smsInboundId string) (*SingleSmsInboundRoot, *Response, error) Create(ctx context.Context, options *CreateSmsInboundOptions) (*SingleSmsInboundRoot, *Response, error) Update(ctx context.Context, options *UpdateSmsInboundOptions) (*SingleSmsInboundRoot, *Response, error) Delete(ctx context.Context, smsInboundId string) (*Response, error) }
type SmsListActivityRoot ¶ added in v1.6.0
type SmsListActivityRoot struct { Data []SmsActivityData `json:"data"` Links Links `json:"links"` Meta Meta `json:"meta"` }
SmsListActivityRoot - format of activity response
type SmsListMessagesRoot ¶ added in v1.6.0
type SmsListMessagesRoot struct { Data []SmsMessageData `json:"data"` Links Links `json:"links"` Meta Meta `json:"meta"` }
SmsListMessagesRoot - format of activity response
type SmsMessage ¶ added in v1.1.8
type SmsMessageData ¶ added in v1.1.8
type SmsMessageData struct { Id string `json:"id"` From string `json:"from"` To []string `json:"to"` Text string `json:"text"` Paused bool `json:"paused"` CreatedAt time.Time `json:"created_at"` SmsMessage []SmsMessage `json:"sms"` SmsActivityData []SmsActivityData `json:"sms_activity"` }
type SmsMessageRoot ¶ added in v1.1.8
type SmsMessageRoot struct {
Data SmsMessageData `json:"data"`
}
type SmsMessageService ¶ added in v1.1.9
type SmsMessageService interface { List(ctx context.Context, options *ListSmsMessageOptions) (*SmsListMessagesRoot, *Response, error) Get(ctx context.Context, smsMessageID string) (*SmsSingleMessagesRoot, *Response, error) }
type SmsNumberOptions ¶ added in v1.1.8
type SmsNumberOptions struct { Paused bool `url:"paused,omitempty"` Page int `url:"page,omitempty"` Limit int `url:"limit,omitempty"` }
SmsNumberOptions - modifies the behavior of SmsNumbersService.List method
type SmsNumberRoot ¶ added in v1.6.0
type SmsNumberRoot struct { Data []Number `json:"data"` Links Links `json:"links"` Meta Meta `json:"meta"` }
SmsNumberRoot - format of activity response
type SmsNumberService ¶ added in v1.1.8
type SmsNumberService interface { List(ctx context.Context, options *SmsNumberOptions) (*SmsNumberRoot, *Response, error) Get(ctx context.Context, numberID string) (*SingleSmsNumberRoot, *Response, error) Update(ctx context.Context, options *SmsNumberSettingOptions) (*SingleSmsNumberRoot, *Response, error) Delete(ctx context.Context, numberID string) (*Response, error) }
type SmsNumberSettingOptions ¶ added in v1.1.8
SmsNumberSettingOptions - modifies the behavior of SmsNumbersService.Update method
type SmsPersonalization ¶ added in v1.2.0
type SmsPersonalization struct { PhoneNumber string `json:"phone_number"` Data map[string]interface{} `json:"data"` }
SmsPersonalization - you can set multiple SmsPersonalization for each Recipient
type SmsRecipient ¶ added in v1.1.8
type SmsRecipientData ¶ added in v1.1.8
type SmsRecipientDataUpdate ¶ added in v1.1.8
type SmsRecipientOptions ¶ added in v1.1.8
type SmsRecipientOptions struct { Status bool `url:"status,omitempty"` SmsNumberId string `url:"sms_number_id,omitempty"` Page int `url:"page,omitempty"` Limit int `url:"limit,omitempty"` }
SmsRecipientOptions - modifies the behavior of SmsNumbersService.List method
type SmsRecipientRoot ¶ added in v1.6.0
type SmsRecipientRoot struct { Data []SmsRecipient `json:"data"` Links Links `json:"links"` Meta Meta `json:"meta"` }
SmsRecipientRoot - format of activity response
type SmsRecipientService ¶ added in v1.1.8
type SmsRecipientService interface { List(ctx context.Context, options *SmsRecipientOptions) (*SmsRecipientRoot, *Response, error) Get(ctx context.Context, smsRecipientId string) (*SingleSmsRecipientRoot, *Response, error) Update(ctx context.Context, options *SmsRecipientSettingOptions) (*SingleSmsRecipientUpdateRoot, *Response, error) }
type SmsRecipientSettingOptions ¶ added in v1.1.8
type SmsRecipientSettingOptions struct { Id string `json:"-"` Status string `json:"status,omitempty"` }
SmsRecipientSettingOptions - modifies the behavior of SmsNumbersService.Update method
type SmsService ¶ added in v1.1.8
type SmsSingleMessagesRoot ¶ added in v1.6.0
type SmsSingleMessagesRoot SmsMessageRoot
SmsSingleMessagesRoot - format of activity response
type SmsWebhook ¶ added in v1.6.0
type SmsWebhookRoot ¶ added in v1.6.0
type SmsWebhookRoot struct { Data []SmsWebhook `json:"data"` Links Links `json:"links"` Meta Meta `json:"meta"` }
SmsWebhookRoot - format of activity response
type SmsWebhookService ¶ added in v1.1.9
type SmsWebhookService interface { List(ctx context.Context, options *ListSmsWebhookOptions) (*SmsWebhookRoot, *Response, error) Get(ctx context.Context, smsWebhookId string) (*SingleSmsWebhookRoot, *Response, error) Create(ctx context.Context, options *CreateSmsWebhookOptions) (*SingleSmsWebhookRoot, *Response, error) Update(ctx context.Context, options *UpdateSmsWebhookOptions) (*SingleSmsWebhookRoot, *Response, error) Delete(ctx context.Context, smsWebhookId string) (*Response, error) }
type Statistics ¶ added in v1.6.0
type Statistics struct { Valid int `json:"valid"` CatchAll int `json:"catch_all"` MailboxFull int `json:"mailbox_full"` RoleBased int `json:"role_based"` Unknown int `json:"unknown"` SyntaxError int `json:"syntax_error"` Typo int `json:"typo"` MailboxNotFound int `json:"mailbox_not_found"` Disposable int `json:"disposable"` MailboxBlocked int `json:"mailbox_blocked"` Failed int `json:"failed"` }
type Substitution
deprecated
type SuppressionBlockData ¶ added in v1.6.0
type SuppressionBlockListData ¶ added in v1.6.0
type SuppressionBlockListRoot ¶ added in v1.6.0
type SuppressionBlockListRoot struct { Data []SuppressionBlockListData `json:"data"` Links `json:"links"` Meta `json:"meta"` }
SuppressionBlockListRoot - recipients response
type SuppressionBlockResponse ¶ added in v1.6.0
type SuppressionBlockResponse struct {
Data []SuppressionBlockData `json:"data"`
}
type SuppressionHardBouncesData ¶ added in v1.6.0
type SuppressionHardBouncesData struct { ID string `json:"id"` Reason string `json:"reason"` CreatedAt time.Time `json:"created_at"` Recipient SuppressionRecipient `json:"recipient"` }
type SuppressionHardBouncesRoot ¶ added in v1.6.0
type SuppressionHardBouncesRoot struct { Data []SuppressionHardBouncesData `json:"data"` Links `json:"links"` Meta `json:"meta"` }
SuppressionHardBouncesRoot - recipients response
type SuppressionOptions ¶ added in v1.1.1
type SuppressionOptions struct { DomainID string `url:"domain_id,omitempty"` Page int `url:"page,omitempty"` Limit int `url:"limit,omitempty"` }
SuppressionOptions - modifies the behavior of SuppressionService.List methods
type SuppressionRecipient ¶ added in v1.6.0
type SuppressionService ¶ added in v1.1.1
type SuppressionService interface { ListBlockList(ctx context.Context, options *SuppressionOptions) (*SuppressionBlockListRoot, *Response, error) ListHardBounces(ctx context.Context, options *SuppressionOptions) (*SuppressionHardBouncesRoot, *Response, error) ListSpamComplaints(ctx context.Context, options *SuppressionOptions) (*SuppressionSpamComplaintsRoot, *Response, error) ListUnsubscribes(ctx context.Context, options *SuppressionOptions) (*SuppressionUnsubscribesRoot, *Response, error) CreateBlock(ctx context.Context, options *CreateSuppressionBlockOptions) (*SuppressionBlockResponse, *Response, error) CreateHardBounce(ctx context.Context, options *CreateSuppressionOptions) (*SuppressionHardBouncesRoot, *Response, error) CreateSpamComplaint(ctx context.Context, options *CreateSuppressionOptions) (*SuppressionSpamComplaintsRoot, *Response, error) CreateUnsubscribe(ctx context.Context, options *CreateSuppressionOptions) (*SuppressionUnsubscribesRoot, *Response, error) Delete(ctx context.Context, options *DeleteSuppressionOptions, suppressionType string) (*Response, error) DeleteAll(ctx context.Context, domainID string, suppressionType string) (*Response, error) }
type SuppressionSpamComplaintsData ¶ added in v1.6.0
type SuppressionSpamComplaintsData struct { ID string `json:"id"` Recipient SuppressionRecipient `json:"recipient"` CreatedAt time.Time `json:"created_at"` }
type SuppressionSpamComplaintsRoot ¶ added in v1.6.0
type SuppressionSpamComplaintsRoot struct { Data []SuppressionSpamComplaintsData `json:"data"` Links `json:"links"` Meta `json:"meta"` }
SuppressionSpamComplaintsRoot - recipients response
type SuppressionUnsubscribesData ¶ added in v1.6.0
type SuppressionUnsubscribesRoot ¶ added in v1.6.0
type SuppressionUnsubscribesRoot struct { Data []SuppressionUnsubscribesData `json:"data"` Links `json:"links"` Meta `json:"meta"` }
SuppressionUnsubscribesRoot - recipients response
type TemplateRoot ¶ added in v1.6.0
type TemplateRoot struct { Data []Template `json:"data"` Links Links `json:"links"` Meta Meta `json:"meta"` }
TemplateRoot format of template response
type TemplateService ¶ added in v1.1.0
type TemplateStats ¶ added in v1.6.0
type TokenRoot ¶ added in v1.6.0
type TokenRoot struct {
Data Token `json:"data"`
}
TokenRoot - format of token response
type TokenService ¶ added in v1.1.0
type UpdateIdentityOptions ¶ added in v1.3.1
type UpdateIdentityOptions CreateIdentityOptions
UpdateIdentityOptions - the Options to set when creating an Identity resource
type UpdateInboundOptions ¶ added in v1.1.5
type UpdateInboundOptions CreateInboundOptions
UpdateInboundOptions - the Options to set when creating an inbound resource
type UpdateSmsInboundOptions ¶ added in v1.1.9
type UpdateSmsInboundOptions struct { Id string `json:"-"` SmsNumberId string `json:"sms_number_id,omitempty"` Name string `json:"name,omitempty"` ForwardUrl string `json:"forward_url,omitempty"` Filter Filter `json:"filter,omitempty"` Enabled *bool `json:"enabled,omitempty"` }
UpdateSmsInboundOptions - modifies the behavior of SmsNumbersService.Update method
type UpdateSmsWebhookOptions ¶ added in v1.1.9
type UpdateSmsWebhookOptions struct { Id string `json:"-"` URL string `json:"url,omitempty"` Name string `json:"name,omitempty"` Events []string `json:"events,omitempty"` Status string `json:"status,omitempty"` Enabled *bool `json:"enabled,omitempty"` }
UpdateSmsWebhookOptions - modifies the behavior of SmsNumbersService.Update method
type UpdateTokenOptions ¶ added in v1.1.0
UpdateTokenOptions - modifies the behavior of TokenService.Update Method
type UpdateWebhookOptions ¶ added in v1.1.0
type UpdateWebhookOptions struct { WebhookID string `json:"-"` Name string `json:"name,omitempty"` URL string `json:"url,omitempty"` Enabled *bool `json:"enabled,omitempty"` Events []string `json:"events,omitempty"` }
UpdateWebhookOptions - modifies the behavior of *WebhookService.Update Method
type Variables
deprecated
type Variables struct { Email string `json:"email"` Substitutions []Substitution `json:"substitutions"` }
Deprecated: Variables - you can set multiple Substitutions for each Recipient
type VerifyRoot ¶ added in v1.6.0
type WebhookRoot ¶ added in v1.6.0
type WebhookRoot struct { Data []Webhook `json:"data"` Links Links `json:"links"` Meta Meta `json:"meta"` }
WebhookRoot - format of webhook response
type WebhookService ¶ added in v1.1.0
type WebhookService interface { List(ctx context.Context, options *ListWebhookOptions) (*WebhookRoot, *Response, error) Get(ctx context.Context, webhookID string) (*SingleWebhookRoot, *Response, error) Create(ctx context.Context, options *CreateWebhookOptions) (*SingleWebhookRoot, *Response, error) Update(ctx context.Context, options *UpdateWebhookOptions) (*SingleWebhookRoot, *Response, error) Delete(ctx context.Context, webhookID string) (*Response, error) }
Source Files
¶
- activity.go
- analytics.go
- api_quota.go
- bulk_email.go
- domains.go
- email.go
- email_verification.go
- helpers.go
- inbound.go
- mailersend.go
- messages.go
- recipients.go
- schedule_message.go
- sender_identities.go
- sms.go
- sms_activity.go
- sms_inbound.go
- sms_messages.go
- sms_numbers.go
- sms_recipients.go
- sms_webhooks.go
- suppressions.go
- templates.go
- tokens.go
- webhooks.go