Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

SparkPost

Schemessparkpost://
Cargo featureservice-sparkpost
Servicehttps://sparkpost.com/
Body formatshtml (first is the default)
Attachmentsyes
Title length250 characters
Body length32,768 characters
Body linesunlimited
Request throttle200 ms between requests
Vendor URLs acceptedno

URL formats

{schema}://{user}@{host}/{apikey}/
{schema}://{user}@{host}/{apikey}/{targets}

{schema} is one of sparkpost://.

URL tokens

TokenMeaningTypeRequiredDefaultNotes
{apikey}API Keystringyessecret
{host}Domainstringyes
{targets}Target Emailslistnoseparated by /
{user}User Namestringyes

Query parameters

ParameterMeaningTypeDefaultNotes
batchBatch Modeboolno
bccBlind Carbon Copylistseparated by , or space
ccCarbon Copylistseparated by , or space
nameFrom Namestring
regionRegion Namechoiceusone of us, eu
toTarget Emailslistsets {targets}

Prefixed parameters:

  • +name=value: Email Header
  • :name=value: Template Tokens

The common URL parameters (format, overflow, verify, redirect, cto, rto, retry, wait, store, tag, tz, user, password, port, optional, emojis) apply as well.

Examples

Accepted URLs (tokens are fake):

sparkpost://user@localhost.localdomain/cccccccccccccccccccccccccccccccc
sparkpost://user@localhost.localdomain/iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii/test@example.com
sparkpost://user@localhost.localdomain/dddddddddddddddddddddddddddddddd?region=uS
sparkpost://user@localhost.localdomain/hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh?name=Jo%20Doe
sparkpost://user@localhost.localdomain/hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh/to@example.com?name=Doe,%20Jo
sparkpost://user@localhost.localdomain/cccccccccccccccccccccccccccccccc?format=markdown
sparkpost://user@localhost.localdomain/kkkk?to=test@example.com
sparkpost://user@localhost.localdomain/hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh?:name=Chris&:status=admin

Rejected URLs:

sparkpost://
sparkpost://:@/
sparkpost://user@localhost.localdomain
sparkpost://localhost.localdomain/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

Send one from the command line:

mercurio -t 'Backup' -b 'Finished in 42s' 'sparkpost://user@localhost.localdomain/cccccccccccccccccccccccccccccccc'

Notes

SparkPost (sparkpost://): e-mail through the SparkPost API.

sparkpost://{user}@{domain}/{apikey}[/{to_email}...] ?region=us|eu&name=..&cc=..&bcc=..&batch=yes&+Header=v&:token=v

+key=value entries become e-mail headers, :key=value entries the substitution data. Without targets the message goes to the sender. HTTP 429 is retried (up to 3 attempts, 5 s apart).