Custom Headers

Custom headers allow you to add additional pieces of data to an email beyond the standard header fields such as "To", "From", "Subject," and "Date." These headers are commonly used to include tracking codes, campaign/tagging information or to control specific behaviors. 

Adding custom headers:

SMTP
You can add custom headers to emails if the sending software you're using provides you the option to include them.

API
If sending via our API, you will include the "custom_headers" parameter in your request.

Example:

curl --request POST \
--url https://api.smtp2go.com/v3/email/send \
--header 'Content-Type: application/json' \
--header 'accept: application/json' \
--data '
{

...

"custom_headers": [
{
"header": "X-My-Custom-Header-Name",
"value": "headervalueexample"
}
]
}
'

 

Note:

  • Custom headers will be blocked if they are headers we use internally (eg your headers names should not include the word "SMTP2GO"). 
  • Non-standardized headers must begin with 'X-'.
  • Avoid leading or trailing whitespace in header values.

If you have questions regarding custom headers or other parts of our service, please reach out to our friendly support team for assistance. 

Was this article helpful?

...