Transactional Email

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

HeaderValuesBehavior
X-Leadpush-TagAny non-empty string, quoted or unquotedStores the value as message.tag, then strips the header from the outgoing email.
X-Leadpush-Trackingall, opens, clicks, noneControls 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.

Example header
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.

Example header
X-Leadpush-Tracking: clicks

Supported values are:

ValueBehavior
allTrack opens and clicks.
opensTrack opens only.
clicksTrack clicks only.
noneDo 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
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.