Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiService ¶
type ApiService struct {
// contains filtered or unexported fields
}
func NewApiService ¶
func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService
func NewApiServiceWithClient ¶
func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService
func (*ApiService) SendTestMarketingEmail ¶
func (c *ApiService) SendTestMarketingEmail(params *SendTestMarketingEmailParam) (interface{}, error)
**This endpoint allows you to send a test marketing email to a list of email addresses**. Before sending a marketing message, you can test it using this endpoint. You may specify up to **10 contacts** in the `emails` request body field. You must also specify a `template_id` and include either a `from_address` or `sender_id`. You can manage your templates with the [Twilio SendGrid App](https://mc.sendgrid.com/dynamic-templates) or the [Transactional Templates API](https://docs.sendgrid.com/api-reference/transactional-templates). > Please note that this endpoint works with Dynamic Transactional Templates only. Legacy Transactional Templates will not be delivered. For more information about managing Dynamic Transactional Templates, see [How to Send Email with Dynamic Transactional Templates](https://sendgrid.com/docs/ui/sending-email/how-to-send-an-email-with-dynamic-transactional-templates/). You can also test your Single Sends in the [Twilio SendGrid Marketing Campaigns UI](https://mc.sendgrid.com/single-sends).
type ErrorResponse ¶
type ErrorResponse struct { Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` // When applicable, this property value will be an error ID. Id *string `json:"id,omitempty"` }
ErrorResponse struct for ErrorResponse
type ErrorResponseErrorsInner ¶
type ErrorResponseErrorsInner struct { // An error message. Message *string `json:"message,omitempty"` // When applicable, this property value will be the field that generated the error. Field *string `json:"field,omitempty"` // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. Help *map[string]interface{} `json:"help,omitempty"` }
ErrorResponseErrorsInner struct for ErrorResponseErrorsInner
type SendTestMarketingEmailParam ¶
type SendTestMarketingEmailParam struct { // SendTestMarketingEmailRequest *SendTestMarketingEmailRequest `json:"SendTestMarketingEmailRequest,omitempty"` }
func (*SendTestMarketingEmailParam) SetSendTestMarketingEmailRequest ¶
func (params *SendTestMarketingEmailParam) SetSendTestMarketingEmailRequest(SendTestMarketingEmailRequest SendTestMarketingEmailRequest) *SendTestMarketingEmailParam
type SendTestMarketingEmailRequest ¶
type SendTestMarketingEmailRequest struct { // The ID of the template that you would like to use. If you use a template that contains a subject and content (either text or HTML), then those values specified at the personalizations or message level will not be used. TemplateId string `json:"template_id"` // You can override the active template with an alternative template version by passing the version ID in this field. If this field is blank, the active template version will be used. VersionIdOverride *string `json:"version_id_override,omitempty"` // This ID must belong to a verified sender. Alternatively, you may supply a `from_address` email. SenderId *int32 `json:"sender_id,omitempty"` // A custom unsubscribe URL. CustomUnsubscribeUrl *string `json:"custom_unsubscribe_url,omitempty"` SuppressionGroupId *int32 `json:"suppression_group_id,omitempty"` // An array of email addresses you want to send the test message to. Emails []string `json:"emails"` // You can either specify this address or specify a verified sender ID. FromAddress *string `json:"from_address,omitempty"` }
SendTestMarketingEmailRequest struct for SendTestMarketingEmailRequest