Following are the settings that can be specified in the filters section of the X-SMTPAPI header. All filters and setting names must be lowercase.
For more information on the utility of these settings, please check out the Settings section.
Some Settings are not listed here because they cannot be defined on a per-message basis. To update these other Settings, please refer to the Web API Filter Settings commands.
Due to low usage, this setting has been removed. Click here for more information.
Sends a BCC copy of the email created in this transaction to the address specified.
Parameter Name | Parameter Value | Parameter Description |
---|---|---|
enable | 0 | 1 | Disable or enable this Setting |
email | email address destination for the bcc message |
1{2"filters": {3"bcc": {4"settings": {5"enable": 1,6"email": "example@example.com"7}8}9}10}
This setting is very powerful, and can only be used on a per-message basis. Use with extreme caution. To learn more about the more granular bypass settings available in the v3 Mail Send API, see our Suppressions Overview documentation.
Some emails are too important to do normal list management checks, such as password resets or critical alerts. Enabling this filter will bypass the normal unsubscribe / bounce / spam report checks and queue the email for delivery.
Parameter Name | Parameter Value | Parameter Description |
---|---|---|
enable | 0 | 1 | Disable or enable this Setting |
1{2"filters": {3"bypass_list_management": {4"settings": {5"enable": 16}7}8}9}
Rewrites links in email text and html bodies to go through our webservers, allowing for tracking when a link is clicked on.
Parameter Name | Parameter Value | Parameter Description |
---|---|---|
enable | 0 | 1 | Disable or enable this Setting |
enable_text | true | false | Enable or Disable click-tracking links in the Plain-Text portion of the message. |
1{2"filters": {3"clicktrack": {4"settings": {5"enable": 1,6"enable_text": true7}8}9}10}
Allows you to specify the domain to use to sign messages with DKIM certification. This domain should match the domain in the From address of your email.
Parameter Name | Parameter Value | Parameter Description |
---|---|---|
domain | domain | The domain you would like your DKIM certification signed with |
use_from | 0 | 1 | If enabled, the domain in the From: header of the email will be used to sign your DKIM |
1{2"filters": {3"dkim": {4"settings": {5"domain": "example.com",6"use_from": false7}8}9}10}
1{2"filters": {3"footer": {4"settings": {5"enable": 1,6"text/html": "<p>Thanks,<br />The SendGrid Team<p>",7"text/plain": "Thanks,\n The SendGrid Team"8}9}10}11}
Re-writes links to integrate with Google Analytics.
Parameter Name | Parameter Value | Parameter Description |
---|---|---|
enable | 0 | 1 | Disable or enable this Setting |
utm_source | string | Value for the utm_source field |
utm_medium | string | Value for the utm_medium field |
utm_term | string | Value for the utm_term field |
utm_content | string | Value for the utm_content field |
utm_campaign | string | Value for the utm_campaign field |
1{2"filters": {3"ganalytics": {4"settings": {5"enable": 1,6"utm_source": "Transactional Email",7"utm_medium": "email",8"utm_content": "Reset Your Password",9"utm_campaign": "Redesigned Transactional Messaging"10}11}12}13}
If you don't use 'replace' this will insert an <img>
tag at the bottom of the html section of an email which will be used to track if an email is opened. If you choose to use 'replace', you can put the tracking pixel wherever you would like in the email and SendGrid will replace it at send time.
Parameter Name | Parameter Value | Parameter Description |
---|---|---|
enable | 0 | 1 | Disable or enable this Setting |
replace | string | A string to be replaced by SendGrid with the tracking image at send time. |
1{2"filters": {3"opentrack": {4"settings": {5"enable": 1,6"replace": "%opentrack%"7}8}9}10}
Due to low usage, this setting has been removed. Click here for more information.
Tests message with SpamAssassin to determine if it is spam, and drop it if it is.
Parameter Name | Parameter Value | Parameter Description |
---|---|---|
enable | 0 | 1 | Disable or enable this Setting |
maxscore | 1 to 10.0 | Score after which the message will be dropped (default is 5.0, higher scores indicate higher likelihood of spam) |
url | url | An optional URL to POST the email and a copy of the report to. Refer to the Spam Checker documentation for POST details. |
1{2"filters": {3"spamcheck": {4"settings": {5"enable": 1,6"maxscore": 3.5,7"url": "http://example.com/compliance"8}9}10}11}
Inserts a subscription management link at the bottom of the text and html bodies or insert the link anywhere in the email.
If you wish to append an unsubscription link, use the text/html
and text/plain
parameters. However, if you wish to have the link replace a tag (such as [unsubscribe]
), use the ``replace parameter.
Parameter Name | Parameter Value | Parameter Description |
---|---|---|
enable | 0 | 1 | Disable or enable this App |
text/html | string | HTML to be appended to the email, with the subscription tracking link. You may control where the link is by using a tag like so: <% link text %> |
text/plain | string | Text to be appended to the email, with the subscription tracking link. You may control where the link is by using a tag like so: <% %> |
replace | string | A tag that will be replaced with the unsubscribe URL (e.g. [unsubscribe_url] ). If this parameter is included, it will override text/html and text/plain The URL of the link will be placed at the replace tag's location, with no html or other formatting. |
The landing
argument cannot be used in SMTPAPI. It can only be setup via the UI or WebAPI, as an account-level setting.
1{2"filters": {3"subscriptiontrack": {4"settings": {5"text/html": "If you would like to unsubscribe and stop receiving these emails <% click here %>.",6"text/plain": "If you would like to unsubscribe and stop receiving these emails click here: <% %>.",7"enable": 18}9}10}11}
This setting refers to SendGrid's transactional templates. SendGrid supports versioning, and the ability to create multiple transactional templates. Previously, we had a Template App, which is now referred to as the Legacy Template App.
Uses a transactional template when sending an email.
Parameter Name | Parameter Value | Parameter Description |
---|---|---|
enable | 0 | 1 | Disable or enable this Setting |
template_id | string | The ID of the template to use when sending a message, represented by a string. |
1{2"filters": {3"templates": {4"settings": {5"enable": 1,6"template_id": "5997fcf6-2b9f-484d-acd5-7e9a99f0dc1f"7}8}9}10}
This setting refers to our original Email Template app. We now support more fully featured transactional templates. You may create multiple transactional templates that allow for versioning, in addition to several other features.
Wraps a template around your email content. Useful for sending out marketing email and other nicely formatted messages.
Parameter Name | Parameter Value | Parameter Description |
---|---|---|
enable | 0 | 1 | Disable or enable this Setting |
text/html | string | String containing html content for the template (must contain a <% body %> tag) |
1{2"filters": {3"template": {4"settings": {5"enable": 1,6"text/html": "<html><head></head><body bgcolor='pink'><div style='width:200px' bgcolor='#FFF'><% body %></div></body></html>"7}8}9}10}