forked from sendgrid/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapps.html
More file actions
652 lines (572 loc) · 15.1 KB
/
Copy pathapps.html
File metadata and controls
652 lines (572 loc) · 15.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
---
layout: page
weight: 0
title: Apps (Filters)
navigation:
show: true
---
<p>Following are the apps that can be specified in the filters section of the X-SMTPAPI header. All filters and setting names must be lowercase.</p>
<p>Please note that if a filter is not specified as being either disabled or enabled in the X-SMTPAPI header, it will default to the state of the app in the "Apps" tab on the website.</p>
{% warning %}
If you're enabling an App, also called a filter, via SMTPAPI, you are required to define all the parameters for the App. If you have the App disabled on the web interface, our system will not pull the settings for the disabled app when you dynamically enable it. For instance, if you have a footer designed but disabled, you can't just enable it via the API; you need to define the footer in the API call itself.
{% endwarning %}
<p>For more information on the utility of these apps, please check out
the <a href="{{root_url}}/Apps/">Apps</a> section.</p>
{% info %}
Some Apps are not listed here, because they cannot be defined on a per-message basis. To update these other Apps, please refer to the
<a href="{{root_url}}/API_Reference/Web_API/filter_settings.html">Web API Filter Settings</a> commands.
{% endinfo %}
{% anchor h3 bcc %}
Filter: <code>bcc</code>
{% endanchor %}
<p>Sends a BCC copy of the email created in this transaction to the address specified.</p>
<table class="table table-striped table-bordered">
<tbody>
<tr>
<th>Parameter Name</th>
<th>Parameter Value</th>
<th>Parameter Description</th>
</tr>
<tr>
<td>enable</td>
<td><code>0</code> | <code>1</code></td>
<td>Disable or enable this App</td>
</tr>
<tr>
<td>email</td>
<td><code>email</code></td>
<td>email address destination for the bcc message</td>
</tr>
</tbody>
</table>
{% codeblock lang:json %}
{
"filters" : {
"bcc" : {
"settings" : {
"enable" : 1,
"email" : "[email protected]"
}
}
}
}
{% endcodeblock %}
<hr/>
{% anchor h3 bypass_list_management %}
Filter: <code>bypass_list_management</code>
{% endanchor %}
<p>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 e-mail for delivery.</p>
<table class="table table-striped table-bordered">
<tbody>
<tr>
<th>Parameter Name</th>
<th>Parameter Value</th>
<th>Parameter Description</th>
</tr>
<tr>
<td>enable</td>
<td><code>0</code> | <code>1</code></td>
<td>Disable or enable this App</td>
</tr>
</tbody>
</table>
{% codeblock lang:json %}
{
"filters" : {
"bypass_list_management" : {
"settings" : {
"enable" : 1
}
}
}
}
{% endcodeblock %}
<hr />
{% anchor h3 clicktrack %}
Filter: <code>clicktrack</code>
{% endanchor %}
<p>Rewrites links in e-mail text and html bodies to go through our webservers, allowing for tracking when a link is clicked on.</p>
<table class="table table-striped table-bordered">
<tbody>
<tr>
<th>Parameter Name</th>
<th>Parameter Value</th>
<th>Parameter Description</th>
</tr>
<tr>
<td>enable</td>
<td><code>0</code> | <code>1</code></td>
<td>Disable or enable this App</td>
</tr>
</tbody>
</table>
<h4>Example X-SMTPAPI Header Value</h4>
{% codeblock lang:json %}
{
"filters" : {
"clicktrack" : {
"settings" : {
"enable" : 1
}
}
}
}
{% endcodeblock %}
<hr/>
{% anchor h3 dkim %}
Filter: <code>dkim</code>
{% endanchor %}
<p>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 e-mail. For more info, check out these <a href="{{root_url}}/Apps/dkim.html">details on DKIM.</a></p>
<table class="table table-striped table-bordered">
<tbody>
<tr>
<th>Parameter Name</th>
<th>Parameter Value</th>
<th>Parameter Description</th>
</tr>
<tr>
<td>domain</td>
<td><code>domain</code></td>
<td>The domain you would like your DKIM certification signed with</td>
</tr>
<tr>
<td>use_from</td>
<td><code>0</code> | <code>1</code></td>
<td>If enabled, the domain in the From: header of the email will be used to sign your DKIM</td>
</tr>
</tbody>
</table>
<h4>Example X-SMTPAPI Header Value</h4>
{% codeblock lang:json %}
{
"filters" : {
"dkim" : {
"settings" : {
"domain" : "example.com",
"use_from" : false
}
}
}
}
{% endcodeblock %}
<hr/>
{% anchor h3 domainkeys %}
Filter: <code>domainkeys</code>
{% endanchor %}
<p>Allows you to specify the domain to use to sign messages with Domain
Keys. This domain should match the domain in the From address of your
e-mail. For more info, check out these <a href="{{root_url}}/Apps/domain_keys.html">details on Domain Keys.</a></p>
<table class="table table-striped table-bordered">
<tbody>
<tr>
<th>Parameter Name</th>
<th>Parameter Value</th>
<th>Parameter Description</th>
</tr>
<tr>
<td>enable</td>
<td><code>0</code> | <code>1</code></td>
<td>Disable or enable this App</td>
</tr>
<tr>
<td>domain</td>
<td><code>domain</code></td>
<td>The domain to sign messages as</td>
</tr>
<tr>
<td>sender</td>
<td><code>0</code> | <code>1</code></td>
<td>1 - Insert a Sender header if the domain specified does not match the From address. 0 - never insert a Sender header</td>
</tr>
</tbody>
</table>
<h4>Example X-SMTPAPI Header Value</h4>
{% codeblock lang:json %}
{
"filters" : {
"domainkeys" : {
"settings" : {
"enable" : 1,
"domain" : "example.com",
"sender" : 1
}
}
}
}
{% endcodeblock %}
<hr/>
{% anchor h3 footer %}
Filter: <code>footer</code>
{% endanchor %}
<p>Inserts a footer at the bottom of the text and HTML bodies.</p>
<table class="table table-striped table-bordered">
<tbody>
<tr>
<th>Parameter Name</th>
<th>Parameter Value</th>
<th>Parameter Description</th>
</tr>
<tr>
<td>enable</td>
<td><code>0</code> | <code>1</code></td>
<td>Disable or enable this App</td>
</tr>
<tr>
<td>text/html</td>
<td><code>string</code></td>
<td>String containing html body</td>
</tr>
<tr>
<td>text/plain</td>
<td><code>string</code></td>
<td>String containing text body</td>
</tr>
</tbody>
</table>
<h4>Example X-SMTPAPI Header Value</h4>
{% codeblock lang:json %}
{
"filters" : {
"footer" : {
"settings" : {
"enable" : 1,
"text/html" : "<p>Thanks,<br />The SendGrid Team<p>",
"text/plain" : "Thanks,\n The SendGrid Team"
}
}
}
}
{% endcodeblock %}
<hr/>
{% anchor h3 forwardspam %}
Filter: <code>forwardspam</code>
{% endanchor %}
<p>Allows for a copy of spam reports to be forwarded to an email address.</p>
<table class="table table-striped table-bordered">
<tbody>
<tr>
<th>Parameter Name</th>
<th>Parameter Value</th>
<th>Parameter Description</th>
</tr>
<tr>
<td>enable</td>
<td><code>0</code> | <code>1</code></td>
<td>Disable or enable this App</td>
</tr>
<tr>
<td>email</td>
<td><code>email</code></td>l</code></td>
<td>email address destination for spam report to go to</td>
</tr>
</tbody>
</table>
{% codeblock lang:json %}
{
"filters" : {
"forwardspam" : {
"settings" : {
"enable" : 1,
"email" : "[email protected]"
}
}
}
}
{% endcodeblock %}
<hr/>
{% anchor h3 ganalytics %}
Filter: <code>ganalytics</code>
{% endanchor %}
<p>Re-writes links to integrate with Google Analytics.</p>
<table class="table table-striped table-bordered">
<tbody>
<tr>
<th>Parameter Name</th>
<th>Parameter Value</th>
<th>Parameter Description</th>
</tr>
<tr>
<td>enable</td>
<td><code>0</code> | <code>1</code></td>
<td>Disable or enable this App</td>
</tr>
<tr>
<td>utm_source</td>
<td><code>string</code></td>
<td>Value for the utm_source field</td>
</tr>
<tr>
<td>utm_medium</td>
<td><code>string</code></td>
<td>Value for the utm_medium field</td>
</tr>
<tr>
<td>utm_term</td>
<td><code>string</code></td>
<td>Value for the utm_term field</td>
</tr>
<tr>
<td>utm_content</td>
<td><code>string</code></td>
<td>Value for the utm_content field</td>
</tr>
<tr>
<td>utm_campaign</td>
<td><code>string</code></td>
<td>Value for the utm_campaign field</td>
</tr>
</tbody>
</table>
<h4>Example X-SMTPAPI Header Value</h4>
{% codeblock lang:json %}
{
"filters" : {
"ganalytics" : {
"settings" : {
"enable" : 1,
"utm_source" : "Transactional Email",
"utm_medium" : "email",
"utm_content" : "Reset Your Password",
"utm_campaign" : "Redesigned Transactional Messaging"
}
}
}
}
{% endcodeblock %}
<hr/>
{% anchor h3 gravatar %}
Filter: <code>gravatar</code>
{% endanchor %}
<p>Inserts an img tag at the bottom of the html section of an e-mail to display the gravatar associated with the mail sender.</p>
<table class="table table-striped table-bordered">
<tbody>
<tr>
<th>Parameter Name</th>
<th>Parameter Value</th>
<th>Parameter Description</th>
</tr>
<tr>
<td>enable</td>
<td><code>0</code> | <code>1</code></td>
<td>Disable or enable this App</td>
</tr>
</tbody>
</table>
<h4>Example X-SMTPAPI Header Value</h4>
{% codeblock lang:json %}
{
"filters" : {
"gravatar" : {
"settings" : {
"enable" : 1
}
}
}
}
{% endcodeblock %}
<hr/>
{% anchor h3 opentrack %}
Filter: <code>opentrack</code>
{% endanchor %}
<p>Inserts an <code><img></code> tag at the bottom of the html section of an e-mail which will be used to track if an e-mail is opened.</p>
<table class="table table-striped table-bordered">
<tbody>
<tr>
<th>Parameter Name</th>
<th>Parameter Value</th>
<th>Parameter Description</th>
</tr>
<tr>
<td>enable</td>
<td><code>0</code> | <code>1</code></td>
<td>Disable or enable this App</td>
</tr>
</tbody>
</table>
<h4>Example X-SMTPAPI Header Value</h4>
{% codeblock lang:json %}
{
"filters" : {
"opentrack" : {
"settings" : {
"enable" : 1
}
}
}
}
{% endcodeblock %}
<hr/>
{% anchor h3 spamcheck %}
Filter: <code>spamcheck</code>
{% endanchor %}
<p>Tests message with <a href="http://spamassassin.apache.org/">SpamAssassin</a> to determine if it is spam, and drop it if it is.</p>
<table class="table table-striped table-bordered">
<tbody>
<tr>
<th>Parameter Name</th>
<th>Parameter Value</th>
<th>Parameter Description</th>
</tr>
<tr>
<td>enable</td>
<td><code>0</code> | <code>1</code></td>
<td>Disable or enable this App</td>
</tr>
<tr>
<td>maxscore</td>
<td><code>-10.0</code> to <code>10.0</code></td>
<td>Score after which the message will be dropped (default is 5.0, higher scores indicate higher likelihood of spam)</td>
</tr>
<tr>
<td>url</td>
<td><code>url</code></td>
<td>an optional url to POST the email and a copy of the report to</td>
</tr>
</tbody>
</table>
<h4>Example X-SMTPAPI Header Value</h4>
{% codeblock lang:json %}
{
"filters" : {
"spamcheck" : {
"settings" : {
"enable" : 1,
"maxscore" : 3.5,
"url" : "http://example.com/compliance"
}
}
}
}
{% endcodeblock %}
<hr/>
{% anchor h3 subscriptiontrack %}
Filter: <code>subscriptiontrack</code>
{% endanchor %}
<p>Inserts a subscription management link at the bottom of the text and html bodies or insert the link anywhere in the email.</p>
<p>If you wish to append an unsubscription link, use the <code>text/html</code> and <code>text/plain</code> paremeters. However, if you wish to have the link replace a tag (such as <code>[unsubscribe]</code>), use the <code>replace</code> parameter.</p>
<table class="table table-striped table-bordered">
<tbody>
<tr>
<th>Parameter Name</th>
<th>Parameter Value</th>
<th>Parameter Description</th>
</tr>
<tr>
<td>enable</td>
<td><code>0</code> | <code>1</code></td>
<td>Disable or enable this App</td>
</tr>
<tr>
<td>text/html</td>
<td><code>string</code></td>
<td>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: <code><% link text %></code></td>
</tr>
<tr>
<td>text/plain</td>
<td><code>string</code></td>
<td>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: <code><% %></code></td>
</tr>
<tr>
<td>replace</td>
<td><code>string</code></td>
<td>A tag that will be replaced with the unsubscribe URL (e.g. <code>-unsubscribe_link-</code>). If this parameter is included, it will override <code>text/html</code> and <code>text/plain</code>.</td>
</tr>
</tbody>
</table>
<h4>Example X-SMTPAPI Header Value</h4>
{% codeblock lang:json %}
{
"filters": {
"subscriptiontrack": {
"settings": {
"text/html": "If you would like to unsubscribe and stop receiving these emails <% click here %>.",
"text/plain": "If you would like to unsubscribe and stop receiving these emails click here: <% %>.",
"enable": 1
}
}
}
}
{% endcodeblock %}
<hr/>
{% anchor h3 templates %}
Filter: <code>templates</code>
{% endanchor %}
{% info %}
This app is our new <a href="{{root_url}}/API_Reference/Web_API_v3/Template_Engine/index.html">Template Engine</a>, that supports multiple templates, versioning and more. Previously, we had a Template App, now called the <a href="#template">Legacy Template App</a>.
{% endinfo %}
<p>Uses a template created with the <a href="{{root_url}}/API_Reference/Web_API_v3/Template_Engine/index.html">Template Engine</a> when sending an email. More information on usage of the Template Engine with the SMTP API may be found in the <a href="{{root_url}}/API_Reference/Web_API_v3/Template_Engine/smtpapi.html">Template Engine API Reference</a>.
<table class="table table-striped table-bordered">
<tbody>
<tr>
<th>Parameter Name</th>
<th>Parameter Value</th>
<th>Parameter Description</th>
</tr>
<tr>
<td>enable</td>
<td><code>0</code> | <code>1</code></td>
<td>Disable or enable this App</td>
</tr>
<tr>
<td>template_id</td>
<td><code>string</code></td>
<td>The ID of the template to use when sending a message, represented by a string.</td>
</tr>
</tbody>
</table>
<h4>Example X-SMTPAPI Header Value</h4>
{% codeblock lang:json %}
{
"filters": {
"templates": {
"settings": {
"enable": 1,
"template_id": "5997fcf6-2b9f-484d-acd5-7e9a99f0dc1f"
}
}
}
}
{% endcodeblock %}
<hr/>
{% anchor h3 template %}
Filter: <code>template</code>
{% endanchor %}
{% warning %}
This app is our original Email Template app, today we have a more full featured <a href="#templates">Template Engine</a>, which supports multiple templates, versioning and more.
{% endwarning %}
<p>Wraps a template around your email content. Useful for sending out marketing email and other nicely formatted messages.</p>
<table class="table table-striped table-bordered">
<tbody>
<tr>
<th>Parameter Name</th>
<th>Parameter Value</th>
<th>Parameter Description</th>
</tr>
<tr>
<td>enable</td>
<td><code>0</code> | <code>1</code></td>
<td>Disable or enable this App</td>
</tr>
<tr>
<td>text/html</td>
<td><code>string</code></td>
<td>String containing html content for the template (must contain a <code><% body %></code> tag)</td>
</tr>
</tbody>
</table>
<h4>Example X-SMTPAPI Header Value</h4>
{% codeblock lang:json %}
{
"filters" : {
"template" : {
"settings" : {
"enable" : 1,
"text/html" : "<html><head></head><body bgcolor='pink'><div style='width:200px' bgcolor='#FFF'><% body %></div></body></html>"
}
}
}
}
{% endcodeblock %}
<hr/>