Custom Email Headers
Pass Leadpush-specific headers with an SMTP message to tag the message or control tracking behavior.
Leadpush supports a small set of custom headers that your application can add when sending transactional email through SMTP. These headers are read by Leadpush during processing and then removed before the message is delivered to the recipient.
Supported headers
| Header | Values | Behavior |
|---|---|---|
X-Leadpush-Tag | Any non-empty string, quoted or unquoted | Stores the value as message.tag, then strips the header from the outgoing email. |
X-Leadpush-Tracking | all, opens, clicks, none | Controls tracking rewrite mode, then strips the header from the outgoing email. Invalid or missing values default to all. |
Message tags
Use X-Leadpush-Tag when you want to group or identify messages by purpose. The value can be any non-empty string, and it can be quoted or unquoted.
X-Leadpush-Tag: "password reset"
The tag is stored on the message as message.tag. Leadpush removes the header before sending the email onward, so recipients do not see it in the delivered message headers.
Tracking controls
Use X-Leadpush-Tracking when a specific transactional message needs different tracking behavior from the default.
X-Leadpush-Tracking: clicks
Supported values are:
| Value | Behavior |
|---|---|
all | Track opens and clicks. |
opens | Track opens only. |
clicks | Track clicks only. |
none | Do not rewrite the message for open or click tracking. |
If the header is missing or the value is not recognized, Leadpush uses all. Leadpush removes the header before delivery.
Example with swaks
Add the custom headers with additional --header arguments when testing through SMTP.
swaks \
--server smtp.leadpush.net \
--port 587 \
--tls \
--auth LOGIN \
--auth-user "$LEADPUSH_SMTP_USERNAME" \
--auth-password "$LEADPUSH_SMTP_PASSWORD" \
--from "$LEADPUSH_SMTP_FROM" \
--to "customer@example.com" \
--header "Subject: Your password reset link" \
--header 'X-Leadpush-Tag: "password reset"' \
--header "X-Leadpush-Tracking: clicks" \
--body "Use this link to reset your password: https://example.com/reset"
When to use these headers
Use custom headers when the application sending the email already knows how the message should be classified or tracked. For example, a password reset flow can tag messages as password reset, while a billing receipt can disable tracking with X-Leadpush-Tracking: none.
For general SMTP setup and sending examples, start with Sending an Email.