Email-SendGrid-V3
view release on metacpan or search on metacpan
Sets the list of categories for this message. The list of categories
must be unique and contain no more than 10 items.
$self->add_category($name);
Adds a new category for this message. The list of categories must be
unique and contain no more than 10 items.
$self->clear_custom_args();
Clears out all custom arguments defined for this message.
$self->set_custom_args(%args);
Sets all custom arguments defined for this message. These can be
overridden at the message personalization level. The total size of
custom arguments cannot exceed 10,000 bytes.
$self->send_at($timestamp);
A unix timestamp (seconds since 1970) specifying when to deliver this
message. Cannot be more than 72 hours in the future.
This can be overridden at the message personalization level.
$self->batch_id($batch_id);
Identifies a batch to include this message in. This batch ID can later
be used to pause or cancel the delivery of a batch (if a future
delivery time was set)
$self->unsubscribe_group($group_id, @display_groups);
If you've set up multiple unsubscribe groups in the SendGrid web
application, this method allows you to specify which group this message
belongs to. If this is set and the user unsubscribes from this message,
they will only be added to the suppression list for that single group.
If not set, they will be added to the global unsubscribe list.
@display_groups is optional. If specified, when the user clicks
"unsubscribe" they will be shown a list of these groups and allowed to
choose which ones he/she would like to unsubscribe from.
$self->ip_pool_name($pool_name);
The IP Pool that you would like to send this email from.
$self->click_tracking($enable, %args);
Whether to enable click-tracking for this message. If enabled, any URLs
in the body of this message will be rewritten to proxy through SendGrid
for tracking purposes. This setting will overwrite the account-level
setting if any. One optional argument is accepted: 'enable_text' which
controls whether the link-rewriting is also performed for plaintext
emails (the rewritten URL will be visible to the recipient)
$self->open_tracking($enable, %args);
Whether to enable open-tracking for this message. If enabled, a single
transparent pixel image is added to the HTML body of this message and
used to determine if and when the recipient opens the message. This
setting will overwrite the account-level setting if any. One optional
argument is accepted: 'substitution_tag' which identifies a token in
the message body that should be replaced with the tracking pixel.
$self->subscription_tracking($enable, %args);
Whether to enable a sendgrid-powered unsubscribe link in the footer of
the email. You may pass optional arguments 'text' and 'html' to control
the verbiage of the unsubscribe link used, OR 'substitution_tag' which
is a token that will be replaced with the unsubscribe URL. This setting
will overwrite the account-level setting if any.
$self->ganalytics($enable, %args);
Whether to enable google analytics tracking for this message. Optional
arguments include 'utm_source', 'utm_medium', 'utm_term',
'utm_content', and 'utm_campaign'. This setting will overwrite the
account-level setting if any.
$self->bcc($enable, %args);
Whether to BCC a monitoring account when sending this message. Optional
arguments include 'email' for the address that will receive the BCC if
one is not configured at the account level. This setting will overwrite
the account-level setting if any.
$self->bypass_list_management($enable);
Whether to bypass the built-in suppression SendGrid provides, such as
unsubscribed recipients, those that have bounced, or marked the emails
as spam. This setting will overwrite the account-level setting if any.
$self->footer($enable, %args);
Whether to add a footer to the outgoing message. Optional arguments
include 'html' and 'text' to specify the footers that will be used for
each message body type. This setting will overwrite the account-level
setting if any.
$self->sandbox_mode($enable);
Whether to enable sandbox mode. When enabled, SendGrid will validate
the contents of this API request for correctness, but will not actually
send the message.
$self->spam_check($enable, %args);
Whether to perform a spam check on this message prior to sending. If
the message fails the spam check, it will be dropped and not sent.
Optional parameters include 'threshold' - an integer score value from
1-10 (default 5) over which a message will be classified as spam, and
'post_to_url' - a SendGrid inbound message parsing URL that will be
used to post back notifications of messages identified as spam and
dropped. These settings will overwrite the account-level settings if
any.
AUTHOR
Grant Street Group <developers@grantstreet.com>
( run in 1.120 second using v1.01-cache-2.11-cpan-75ffa21a3d4 )