Track delivery, opens and clicks on every transactional email a Vendure
server sends. Wraps @vendure/email-plugin, records every send, delivery,
bounce, open and click as its own event (never deduplicated), verifies
Postmark, SendGrid, Mailgun and Amazon SES delivery webhooks, classifies
opens and clicks as human- or machine-likely, hashes IPs, suppresses bounced
recipients automatically, exports CSV — and ships an admin UI with an email
activity timeline on every order, a PDF delivery evidence report and a
per-customer Emails tab.
Maintained by Wayne Garrison.
Free, in every tier: the email log with honest send outcomes; open and click recording (bot-aware: scanners, link checkers and Apple Mail Privacy Protection are recorded but not counted); the suppression list, enforced at send for every email (a password reset is still sent) with an admin list to search, add and remove; hard-bounce and complaint handling from the bounce webhook and from verified provider webhooks (bounces, complaints, drops); the per-order email list on the order page and the per-customer Emails tab; privacy export / erase by address; the tracking switches and trusted proxies; the dashboard widget.
Premium (licence, or the 14-day evaluation) — exactly PREMIUM_FEATURES:
When a licence lapses the premium features stop (the weekly report is not sent, the checklist is not shown); their data and settings are kept and come back with a key.
Every install gets a 14-day evaluation with all features on — no card, nothing to start. Then £6.95/month, or £139 one-off lifetime at elite.charity/licence/buy/vendure-plugin-email-tracking. Subscribe (or buy lifetime) from the plugin's admin page — checkout opens in a new tab and the key installs itself; subscribing during the evaluation puts the first charge on the day it ends.
Then add the UI extensions to your compileUiExtensions config:
Since 0.17.0: opens, clicks and the suppression list are free; the weekly report and the set-up checklist are premium.
email_loghas a newmachineCountcolumn (see Upgrading to 0.17.0). The bounce webhook is strict: onlystatus: "bounced"withbounceType: "hard" | "soft", orstatus: "complained", is accepted (anything else is 400), and it suppresses per recipient. The email type comes from the EmailPlugin event that sent it (order-confirmation,password-reset, …), not the subject.
Since 0.14.2: the bounce webhook needs
bounceWebhookSecret(orallowUnauthenticatedBounceWebhook: trueon a private network); rows are pruned after 365 days by default (retention); the visitor IP isreq.ipunless you list proxy headers intrustedIpHeaders; unsigned click links only redirect to your own hosts — setsigningSecretfor full tracking.
Since 0.14.3: links are always signed — without
signingSecreta random per-install secret is generated at boot and kept inhulo_licence_store(keyvendure-plugin-email-tracking:signing-secret, shared by server and worker). SetsigningSecretyourself to keep links in already-sent emails valid across reinstalls and database restores. Emails sent before any secret existed keep working (pixel served, clicks to your own hosts only). Mail sent through the Vendure email pipeline now records the SMTP Message-ID and reply, so the bounce webhook can match it.
Since 0.16.0: one new table,
email_event(hosts onsynchronize: falsecreate it first: see Upgrading to 0.16.0). Every send outcome, open, click, bounce and verified provider event is a row there;email_logis unchanged and keeps its counters and JSON history. Without new options the plugin behaves as 0.15.4 apart from the new event rows and admin panels and the changes below: no new third-party calls, every provider webhook is refused (401, after the body checks), and tracked links keep the same format. A host plugin that listsEmailTrackingServicein its ownprovidersstill boots (see Universal capture). Opens and clicks through bare (unsigned) ids — which anyone can type — are recorded asunverifiedevents only and no longer counted inemail_log. Recorded click URLs now have secrets (and email addresses) redacted, and statuses follow a fixed precedence (a soft bounce never turns a bounced or delivered email back intodeferred). The click redirect no longer waits for the click to be recorded./email-track/bounceand/email-track/webhook/*get a raw-body capture so signatures are checked over the exact bytes;/email-track/bouncetakesapplication/jsononly (at most 100 KB, as before). CSV exports quote every cell and start with a UTF-8 byte-order mark, and the Email Log's Export CSV works (since it was added in 0.3.0,log/:idhad answered it with 400). Every admin REST response is sentCache-Control: private, no-store. The Email Log page countsdelivered(andsuppressed) emails in its totals.
Since 0.16.3: no schema change, and stored statuses are not rewritten; they are read the same new way everywhere (see Send attempts). An email still being sent reads "Sending…", never sent, and one cut off before its reply "No reply recorded"; an SMTP 4xx or a connection / timeout error reads "Deferred, retrying" and is linked to the retry ("Sent after 1 retry"); the order card counts emails "accepted by the mail server" and shows "delivered" only when a provider webhook can report it (not on the free tier, which does not record deliveries); only emails from before the event timeline carry the legacy badge. The Email Log's cards and list share one period and filter set, Failed counts emails that failed for good, and By template's Sent counts accepted emails only. The weekly report's "emails tracked" counts accepted emails too, so it reads lower than before for the same emails. SES sends are stored as sent (the SES reply, a message id, was read as a failure code); earlier rows keep their status.
Every email produced by @vendure/email-plugin (order confirmation,
password reset, OTP, invoice, etc.) is logged automatically — no
per-handler wiring. Inject EmailTrackingService for ad-hoc sends from
your own plugin code and get the same engagement tracking:
Importing EmailTrackingPlugin gives your code the plugin's own instances.
Listing EmailTrackingService in your plugin's providers instead (the
way 0.15.x hosts did it) also works: Nest then creates a second instance,
which writes to the same tables (on the worker it also runs the daily
retention sweep and schedules the weekly report, which is still sent once
per install).
/email-track/open/:token.gif — the token is
<id>.<hmac> (signed with signingSecret, or the generated per-install
secret) and a forged signature is rejected. A bare numeric id (the links
in emails sent before any signing secret existed) still works — the pixel
is served and clicks redirect to your own hosts — but is unsigned:
anyone can type one. It is accepted for every email that has no 0.16.0
send event saying its links were signed, i.e. every email sent before
0.16.0, signed or not. While a signing secret exists (always, unless the
licence store was unavailable at boot) such a hit is recorded as an
unverified event only — reason unsigned-token, never enriched, at most
10 opens and 10 clicks per email per day — and never changes email_log
(open / click counts, first open / click, the JSON history) or any figure
of the order summary and the evidence report. A bare id of an email whose
own links were signed is not recorded at all. Without any signing secret
every link is a bare id: its opens and clicks are then counted as in
0.15.4, still flagged unverified on their events./email-track/click/:token?u=… — skips
mailto:, tel:, #-anchors, and unsubscribe/opt-out links.
Each rewritten link carries s, an HMAC over the token and u, so the
destination cannot be swapped; links without a valid s only redirect
to the shop's own hosts. Optional clickRedirectAllowedDomains narrows
the allowed destinations further.
Per-link tokens minted with EmailLinkService.issueLinkToken() (64-hex,
?u=…&s=<hmac>) are honoured too: the row must exist and be unexpired,
and both the signature and the stored destination hash must match u,
so a token cannot be pointed at another URL. Sensitive links are recorded
by their redacted form.TrackingEmailSender records nodemailer's Message-ID (without angle
brackets) and SMTP reply on the row, and sets sent / deferred /
failed from the reply code. The row is written before SMTP starts;
until the reply (or the error) is recorded it reads as sending.email_event row (below), up to 100 of each per email per day.linkIndex in the JSON and link_index in the CSV
are 0-based, so that link is 1). Per-link tokens from EmailLinkService
carry their own index and text.https://host/path?[redacted] (event and clicksJson) when it carries
user info, a query parameter whose name holds a secret (token, code, key,
sig, signature, auth, password, reset, otp, session, sid, jwt, apikey, pin,
magic, nonce, hash, ticket, …), a parameter whose value is an email address
(?email=bea@example.com), a parameter whose value is a URL that does
(?next=/reset?token=…, also when encoded), a key=value fragment
(#access_token=…), or an account-action path (reset, password, verify,
confirm, activate, login, magic, auth, token, invite, unsubscribe, …) with
any query; token-like segments after such a path segment become
[redacted] too (/password/reset/[redacted]). The same applies to the
click URLs providers report, after one of the plugin's own tracked links
is unwrapped to its destination. The redirect still goes to the real URL.
The Email Log detail shows click history written before 0.16.0 redacted
the same way.email_event)One row per event, never deduplicated — three Gmail-proxy fetches are three
rows — up to 100 opens and 100 clicks per email per UTC day through the
plugin's own pixel and redirector (10 of each through bare ids). Past that,
one marker row ("Further opens not stored", reason events-capped, saying
how many were stored) stands for the rest of the day and nothing more is
stored, while signed hits still increment the email_log counters: one
tracked URL, or enumerated bare ids, cannot grow the table without bound.
Each server process records one email's hits one at a time, so a burst
cannot pass the count together; with several server instances a few more
rows can land at the limit. The types: send outcomes sent, failed, deferred, suppressed;
delivery delivered, bounced (hard), soft-bounce, complained,
dropped (refused or rejected by the provider), unsubscribed; engagement
open, click. Each row carries the email's order, customer and channel,
its source (smtp, pixel, redirect, bounce-webhook, postmark,
sendgrid, mailgun, ses, admin), the time, the Message-ID and the
provider's id, the IP as stored (raw or hashed per hashIpsInHistory) plus
ipHash, the GeoLite2 location, the user agent (1 000 characters) with the
parsed client, the classification, the clicked URL and link, a detail line
(SMTP reply, bounce reason) and a small sanitised provider payload. The
recipient address is never stored there in clear — only a keyed hash: email
addresses in SMTP and provider text (bounce diagnostics often quote the
recipient) are replaced by <address>, message ids excepted, and a clicked
URL whose query holds an address is stored redacted. The IP and
recipient hashes are HMACs keyed with ipSalt, or with the install's
signing secret when ipSalt is not set (never the public default salt once
a secret exists); the IP is the validated, canonical address (one IP, one
hash, whatever the notation). Event rows are best-effort: a failed write
never stops a send, a pixel or a redirect.
Free tier: send outcomes, opens, clicks (since 0.17.0), bounces, complaints and provider drops are recorded; provider delivered / deferred / unsubscribe and engagement events and the order activity timeline need premium access.
Status precedence. email_log.status only ever moves up this order,
whatever order events arrive in: sent < deferred < delivered <
bounced < complained < failed < suppressed. A provider "delivered"
moves sent or deferred to delivered but never overwrites bounced,
complained or failed; a soft bounce or deferral only replaces sent; a late
hard bounce replaces delivered; a complaint replaces a bounce. failed
comes from the send path (refused at submit) and from a provider drop for a
reason other than a bad address (unsubscribed address, spam content, a bad
SMTPAPI header, quota) — such a drop moves only sent or deferred to
failed, never a delivered, bounced or complained email. suppressed comes
from the send path only. Nothing overwrites failed or suppressed.
Emails sent before 0.16.0 have no event rows. The order timeline still
shows them: a sent (or failed / suppressed) entry from the log row, its
bounce or delivery status (shown at the send time and saying so: the time
it was set was never recorded), and the opens and clicks in opensJson /
clicksJson, marked legacy. No backfill runs. Since 0.16.3 only emails
created before the install's first send event are legacy; a later email
without a send event (still being sent, cut off before its reply, or its
event could not be written) is read from the log row too, as kind log,
without the badge (the evidence report marks it "from email log").
Every send writes its email_log row before SMTP starts, and Vendure's
EmailPlugin runs a failed send job again (5 retries), each run with a row
of its own. Since 0.16.3 every view — the order card and timeline, the
exports, the evidence report, the Email Log list and cards, By template and
the weekly figures — reads a row with the other attempts of the same email:
unknown): still no reply or error after
that, on an email created after the event timeline began — the send was
cut off, for example by a worker restart mid-SMTP. It is not counted as
sent. An older email without a reply is from before replies were recorded
(0.14.3) and keeps its stored status.retryOf / retriedBy): "Deferred, retried" (or
"Send failed, retried" after a 5xx, "No reply recorded, retried"), then
"Sent after 1 retry".deferred: the job does not run it again.Accepted by the mail server means the SMTP server took the email (sent,
delivered, bounced, complained, or deferred by the provider afterwards).
Delivery to the inbox is only known when a provider webhook reports it (and
the free tier does not record a provider's deliveries); the order summary
and the Email Log summary say whether deliveries can be reported
(deliveryEvents).
The windows are measured with the database's clock (createdAt and
updatedAt are written by the database), so a database session in another
time zone than the Node process does not shift them.
Every open and click is classified human_likely, machine_likely or
unknown by the licence SDK's classifier, with reason codes such as
gmail-proxy, ampp, safelinks, proofpoint, bot-ua, headless,
prefetch, no-ua and — with IP enrichment — datacentre, vpn, proxy,
tor. Since 0.17.0 an open from Apple's network (17.0.0.0/8) gets
apple-network and ampp (Mail Privacy Protection fetches every image as
the message arrives). An open or click through an unsigned (bare-id) link is
classified unverified instead — never human or machine — with
unsigned-token first among its reasons (the user-agent reasons follow).
Nothing is blocked: every hit is recorded and every click redirects.
Counting (0.17.0). Machine traffic is not counted in openCount /
clickCount (nor first-open / first-click): it goes to
email_log.machineCount, so open and click rates are people. Opens whose
only strong machine signal is an image proxy that loads images when the
recipient opens the message (Gmail, Yahoo Mail, Outlook) still count — the
open itself is real. Same rules as the WordPress plugin.
GET /email-track/orders/:orderId/activity builds the order's timeline from
its email events, the legacy entries above and Vendure's own order history
(state transitions, payments with amount and method, fulfilments, refunds,
cancellations, modifications, coupons, customer changes and notes —
private notes included, each note whole), sorted by time. Filters: all, emails, opens,
clicks, delivery (delivered, deferred, bounces, complaints, dropped,
failed, suppressed), order (order and payment history) and notes.
Cursor pagination, 100 per page by default (take up to 500,
order=desc for newest first). The first page carries the summary: order
code, customer, placed at, total (in the host's MoneyStrategy precision),
payment state, emails (a retried email counts once; attempts counts
rows) accepted by the mail server (sent) / delivered as a provider
webhook reported it / sending / retrying / deferred / without a reply
(unknown) / failed / suppressed / opened (with the first open) / clicked
/ bounced or complained — the engagement figures from the
email_log counters, which hits through bare ids never move —, whether
deliveries can be reported at all (deliveryEvents: a provider webhook is
configured, and not the free tier) and human vs machine opens and clicks (unverified events from
bare ids are counted apart, as unsigned). Send items carry sendState,
retryOf and retriedBy (see Send attempts). Every
response carries a cautionary note: IP-derived location is approximate and
may show a mail proxy, VPN or scanner. When Vendure's order history cannot
be read (the server log says why), the response says so
(historyUnavailable: true) and the page and the PDF show a notice instead
of silently leaving those entries out.
Exports:
activity.csv — redacted (IP as stored, sensitive URLs redacted, no
payloads). Every cell is quoted and a leading = + - @ (also after
spaces or invisible characters) is neutralised, so no spreadsheet runs a
formula, whatever its list separator; the file starts with a UTF-8
byte-order mark so Excel shows →, — and accented names correctly.activity.json — the same fields as JSON, plus the summary and
timelineSha256.?filter= (the timeline filters above); a filtered export says
so in its file name (order-<code>-activity-clicks-<date>.csv) and its
timelineSha256 is null. Without filter they cover the whole timeline.
The page's Export CSV follows the active filter.activity.json?full=1 — every stored column, provider payloads and full
user agents (the page's Full export always asks for the whole
timeline). Needs the ExportEmailEvidence permission.activity.json?evidence=1 (&internalNotes=1) — exactly the items the
evidence report prints (below), with their timelineSha256.POST /email-track/orders/:orderId/evidence-link returns a URL to
…/evidence.pdf?exp=&uid=&sig=: an HMAC over the order id, the expiry,
the admin's user id and whether internal notes are included, signed with
the plugin's signing secret, valid for five minutes. The PDF route needs no
session, so the report opens in a new tab under bearer-token auth too; a
tampered, re-pointed, widened or expired link gets 403. The report is meant
to be handed to a payment processor or a customer, so private (internal)
order notes are left out unless the link was minted with
{ "internalNotes": true } (the page's Include internal notes); they
are then printed as "Note (internal)", and the header says either way.
Order-history entries of a type the plugin does not know show their type
only, never their raw data. The A4 report has the shop, order, customer,
placed at, total, payment state, generated at (UTC) and by whom, the
internal-notes line, the summary, the timeline (time, event, detail,
approximate location, client and classification), a "How to read this
report" note and page numbers, and ends with the SHA-256 of the canonical
JSON (sorted keys, no whitespace) of the items it printed — the items of
activity.json?evidence=1 (with &internalNotes=1 when they were
included); an export of the unchanged timeline gives the same value. A
table cell longer than a page (about 85 lines, some 4 000 characters of
ordinary text) is cut and says how many characters are missing, spaces
and line breaks included ("… (truncated, N more characters: see
activity.json)"), its author line always kept; the timeline,
activity.json and activity.csv keep every character of a note. The
hash line and its explanation are never split across pages. Rows from
unsigned links are marked "unverified (unsigned link)" and explained in
the note. It is written by a small built-in PDF writer (standard
Helvetica in WinAnsi, no dependencies, nothing stored): → prints as ->, accented Latin letters outside Latin-1 as
their base letter (Ł as L), and scripts outside it (Cyrillic, Greek,
CJK, emoji) as ? — the CSV and JSON exports keep every character.All of these need ReadOrder and ReadCustomer, see only orders on the admin's
active channel (404 otherwise) and are premium (402 unlicensed). The admin
UI sends the active channel token (vendure-token) and, under bearer-token
auth, the Authorization header with every call, as Vendure does for its
GraphQL calls; other API clients must send them too.
POST /email-track/webhook/:provider takes delivery events from
Postmark, SendGrid, Mailgun and Amazon SES (through SNS).
Each provider is off until configured in providerWebhooks:
| Provider | Configure | Verification |
|---|---|---|
| Postmark | postmark: { username, password }; webhook URL https://user:pass@shop.example.com/email-track/webhook/postmark | HTTP Basic credentials, constant-time compare |
| SendGrid | sendgrid: { verificationKey } — Mail Settings → Event Webhook → "Signed Event Webhook" key (base64 DER as shown, or PEM) | ECDSA P-256 / SHA-256 over the timestamp header + the exact raw body; a timestamp more than 72 hours from now is refused |
| Mailgun | mailgun: { signingKey } — the HTTP webhook signing key; JSON webhooks | HMAC-SHA256 over timestamp + token; timestamps more than 15 minutes off refused; each token accepted once (reserved the moment it verifies, so concurrent copies are refused too) |
| Amazon SES | ses: { topicArns, autoConfirmSubscription? } (full topic ARNs); subscribe the URL to the SNS topic (HTTPS) | SNS message signature (v1 SHA1withRSA, v2 SHA256withRSA — prefer 2); body TopicArn on the list; Timestamp at most 24 hours old; certificate only from the topic's own region, https://sns.<region>.amazonaws.com(.cn)/SimpleNotificationService-<hex>.pem |
An unknown provider answers 404 before a byte of the body is read. Every
known provider slug, configured or not, then goes through the same body
checks, which depend on the slug only — application/json (text/plain
for SNS only), uncompressed (415), at most 1 MB for SendGrid (batches of up
to 768 KB) and Postmark (which can add the bounce dump), 320 KB for SES and
256 KB for Mailgun (413), arriving within 10 seconds (408) — and a provider
that is not configured answers 401 exactly like a failed check: same body
read, empty body, same headers (Connection: close), so nothing reveals
which providers are on. It also runs the signature check a configured one
would, against throwaway credentials, so the time the check takes does not
give it away either (an unconfigured SES has no topic list and stops where a
configured one stops for a topic not on its list). SendGrid and Postmark
put their signature or credentials outside the body, so their body is
parsed only once the check has passed; Mailgun and SNS sign fields inside
it, so a body to those two is parsed first — after a scan that refuses
(400) one nested deeper than 32 levels or holding more than 1 000 arrays
and objects (a Mailgun event has about 25, an SNS envelope 4), the shapes
that make parsing slow. Accepted requests answer 204, also for a retry of an
event already recorded (the provider's event id is a unique dedupeKey).
If the status or suppression update fails, the event row is removed again
and the answer is 500, so the provider's retry is processed in full.
Rate limits, per client IP (providerWebhooks.rateLimit): requests that
fail a body check or verification spend the address's failure allowance
(default: your rateLimit, 60 a minute); an address that has used it up is
answered 429 before its body is read. Verified requests never touch it:
they spend only their provider's verified allowance for that address
(default 1 200 a minute; 429 when used up, so the provider retries later).
Junk from anyone therefore cannot throttle real bounce and complaint
processing — as long as the plugin sees the real client address: behind a
reverse proxy, set trustedIpHeaders (or Express trust proxy), otherwise
every request, the providers' included, shares the proxy's address. Mailgun,
Postmark and SNS post one request per event: size verified for your peak
per provider IP. SNS retries an HTTPS endpoint only a few times (about 20 s
apart, by default) before it drops a message, so for SES keep verified
generous or give the subscription a delivery policy with more retries.
Replays: a signed request captured somewhere (a proxy log, a second consumer of the same webhook) is refused once it is outside the provider's window (SendGrid 72 hours, SNS 24 hours, Mailgun 15 minutes); inside it, it is a no-op while its event row exists — the retention sweeper keeps event rows at least 3 days. Mailgun signs only the timestamp and token, not the event data, so its replay protection is the token memory, which is per server process: with several server instances behind a load balancer, one captured Mailgun token could be used once on each within its 15 minutes.
What each event does:
bounce / spamreport / dropped with exactly the reason
"Bounced Address", "Invalid" or "Spam Reporting Address", Mailgun failed +
permanent with reason bounce, suppress-bounce or suppress-complaint,
Mailgun complained, Postmark HardBounce / BadEmailAddress /
SpamComplaint): the recipient joins the suppression list — also when no
email matched, because a verified provider says the address is bad.
Processed in every tier.suppress-unsubscribe, old, …; SES Reject; Postmark
ManuallyDeactivated, …): recorded, never suppresses; moves a sent or
deferred email to failed. Processed in every tier.blocked and deferred, Mailgun failed + temporary, Postmark SoftBounce,
Transient, DnsError, …): recorded, never suppresses.delivered (premium).recordEngagement: true; then recorded as events (premium) but never
counted in email_log, because the plugin's own pixel and redirector
already count them. A reported click URL that is one of the plugin's own
tracked links is stored as its destination, redacted (and named by its
link index and text); any other is redacted too.Events find their email by, in order: the correlation id the sender adds to
outgoing mail for each configured provider (SendGrid X-SMTPAPI
unique_args, Mailgun X-Mailgun-Variables, Postmark
X-PM-Metadata-hulo-log-id, SES X-SES-MESSAGE-TAGS; the value is
<email_log id>-<HMAC> signed with the install's signing secret, so an
event a shared provider account reports for another shop's mail never links
to one of yours — it is not personal data, and some providers pass the header
on to the recipient), the Message-ID (with or without brackets), then the
provider id parsed from the SMTP reply (queued as <id>, SES 250 Ok <id>).
The JSON headers go out as raw JSON (nodemailer would otherwise RFC
2047-encode them), non-ASCII \u-escaped and folded only between tokens; the
Postmark metadata key is read whatever its case, since nodemailer sends that
header as X-Pm-Metadata-Hulo-Log-ID. These header formats follow the
providers' documentation and are covered by tests that serialise a real
message; they have not yet been checked against live provider accounts. An
event that matches nothing is still recorded, with a keyed hash of the
recipient. For SES, a SubscriptionConfirmation is
confirmed automatically after verification (only a SubscribeURL on the
topic's own https://sns.<region>.amazonaws.com for the same topic is
fetched); autoConfirmSubscription: false logs it for you to confirm
instead.
Off unless ipEnrichment is set — with no value the plugin calls no
third-party service. When set, each open and click with a public IP is
looked up asynchronously after its row is written: country, region, city,
ASN, organisation, timezone and proxy / VPN / Tor / datacentre / mobile
flags, stored on the event, and the event is re-classified with those flags.
The location is merged as a unit, so no place is shown that no source
reported: a GeoLite2 city is kept whole; with only a GeoLite2 country, the
provider's region / city / timezone are taken only when it names the same
country; without GeoLite2, the provider's location is taken whole. Private
and reserved addresses (10/8, 172.16/12, 192.168/16, 127/8, 169.254/16,
100.64/10, 0/8, multicast, the documentation and other reserved ranges,
::1, fc00::/7, fe80::/10, local-use NAT64 64:ff9b:1::/48, and the
IPv4-mapped, NAT64 64:ff9b::/96 and 6to4 2002::/16 forms of the private
IPv4 ranges) are never sent. Only the validated address is looked up, in its
canonical form (an address with a %zone suffix is not looked up at all), so
the cache key, the provider URL and a custom lookup all see the same
value. Results are cached per IP (cacheTtlMs, default 24 h); a lookup over
maxLookupsPerMinute is dropped, not queued; each lookup times out after
5 s; every value is clamped to its column (the AS number only). Events from
unsigned links are never looked up. The raw IP lives in memory only for the
lookup, so it works with hashIpsInHistory: true.
The free ip-api endpoint logs a warning at boot: it is plain HTTP, limited to 45 requests a minute and licensed for non-commercial use only.
EmailSuppression entity, one bare lower-cased address per row. Hard
bounces and complaints auto-populate — from /email-track/bounce and from
verified provider webhooks.TrackingEmailSender
(every EmailPlugin email) and sendTracked(). Suppressed addresses are
dropped from the To list; with nobody left the email is not sent and a
status='suppressed' row (and a suppressed event) records the attempt —
no error, so the email job does not retry. A partly suppressed email is
sent to the others and its row notes who was left out.suppressionExemptTypes (default
['password-reset']), so a customer can always get back into their
account. Only a type the sender gave counts (the EmailPlugin event type,
or sendTracked's meta.type), never one guessed from the subject.GET /email-track/suppression?q=&take=&skip=
(total counts every match), POST { recipient, reason?, note? }
(one address; manual, unsubscribe, hard-bounce, complaint),
DELETE /email-track/suppression/:recipient.The type on each log row is the EmailPlugin event handler's type
(order-confirmation, password-reset, email-verification,
email-address-change, or your own handler's), and the order comes from its
template variables — the plugin wraps the EmailPlugin's send job so
TrackingEmailSender knows who is sending. Emails sent through an
EmailSender outside that job fall back to the subject-based label (never
used for a suppression exemption); label them with
withEmailContext({ type, orderId }, () => sender.send(…)).
Email Log → Settings: Track opens (the pixel) and Track link clicks
(link rewriting), defaults from trackOpens / trackClicks (true). Off
stops it at once for new emails and new hits; the pixel and old links keep
answering, and what was recorded stays until retention removes it.
Trusted proxies: IPs / CIDR ranges (IPv4 and IPv6), added to
trustedProxies from init. When any are set, the trustedIpHeaders are
believed only for a connection from one of them, and in X-Forwarded-For
the visitor is the right-most hop that is not one of them. Stored in
hulo_plugin_prefs (tracking.opens, tracking.clicks,
tracking.trustedProxies); the server and the worker pick a change up
within a minute. GET /email-track/settings, POST /email-track/settings
{ trackOpens?, trackClicks?, trustedProxies? } (SuperAdmin).
Email Log → Privacy, or GET /email-track/privacy/export?email= (JSON
download; ReadCustomer) and POST /email-track/privacy/erase
{ email, confirm: true } (DeleteCustomer). The export holds the address's
emails (type, subject, status, opens, clicks, machine hits, the order), their
events (time, kind, approximate location, client, classification) and its
suppression entry. Erasing deletes those emails (an email to several
recipients as a whole), their email_event and email_link rows and the
events recorded against the address alone; the suppression entry is kept
— it is the record that the address must not be emailed — and the answer
says so (remove it from the list too if it should go).
GET /email-track/log/stats/by-template?fromDays=30 returns open
rate, click rate and click-to-open per email type.POST /email-track/bounce with { messageId, status, bounceType, recipient?, reason } as
application/json (at most 100 KB, gzip or deflate accepted, as before).
Other content types answer 415, so a web page cannot post a cross-site
text/plain or form request to it; over the rate limit, 429 before the
body is read.status must be
bounced / bounce or complained / complaint, and a bounce must say
bounceType hard (permanent) or soft (transient, temporary).
Anything else — a relay forwarding deliveries or opens, a provider's own
words — is 400 and changes nothing. A hard bounce or a complaint
suppresses the address the report names in recipient (or email; it
must be one of the email's recipients, else matched: false), or the
email's only recipient; an email to several people with no address named
suppresses nobody. The answer is { ok, matched, suppressed }.X-Signature (HMAC-SHA256) against bounceWebhookSecret or a
configured signingSecret (a generated one is never used here, since
the sender could not know it). Postmaster integrations stay loose-coupled.soft-bounce event and never suppresses. Each call is an event on the timeline./extensions/email-log/orders/:orderId,
also linked from Email Log rows): filters, the timeline with classification
badges ("Unverified" for bare-id hits) and reason chips, approximate
location under a cautionary note, client and the clicked link ("Link #2:
…"), notes with their line breaks, Load more, Export CSV (of the
active filter), Evidence
report (PDF) with Include internal notes, and, for admins with
ExportEmailEvidence, Full export; downloads get the server's file
names (filter and date included). Unlicensed installs see the premium
notice instead; a timeline that cannot be loaded (role, channel) says so,
with Try again, and missing order history gets its own notice.GET /email-track/log/export.csv?status=sent&from=2026-05-01 (premium;
the Email Log's Export CSV) — same filters as the list endpoint
(status takes one stored status or a comma-separated list, e.g.
sent,delivered; state how the send went, e.g. failed or
sending,retrying; fromDays a period), up to 50 000 rows, with each
row's state as the last column. Every cell is quoted, with the
formula-injection guard, after a UTF-8 byte-order mark. From 0.3.0 to
0.15.4 this route never answered: log/:id, declared first, took it and
replied 400 "Invalid id".hashIpsInHistory: true (default) stores hashed IPs. Set ipSalt to a
long random value: without it, the open / click history in email_log
hashes with a public default salt (anyone holding a hash can recover the
IP by trying addresses) and a boot warning says so; email_event hashes
are keyed with the signing secret then.Cache-Control: private, no-store, so neither a
browser nor a CDN keeps one (some CDNs cache by URL extension, .csv or
.pdf, even for signed-in users); GET /email-track/log/:id takes digits
only (/log/1.csv is 404, not email #1).providerWebhooks.rateLimit, above).req.ip
unless you list the proxy headers your edge sets in trustedIpHeaders
(or set Express trust proxy): behind a reverse proxy without either,
every visitor and every provider shares the proxy's address.The sweeper runs once a day on the worker only, deletes in batches of
5 000 rows (oldest id first, with a short pause between batches so the
sender is never stalled by one long DELETE; each batch is counted from the
rows it selected, so PostgreSQL prunes as fully as MySQL), prunes
email_link rows past their expiresAt or older than days, prunes
email_event rows older than days (at least 3 days, so a provider's
replay window never outlives the dedupe row) — by their own age, so an open
recorded after its email was sent outlives the email's row for a while and
then shows without its email type —, those of emails maxRows removed, and
— under maxRows — unlinked events (admin suppressions, unmatched provider
events) older than the oldest email kept; it is .unref()'d so it never
blocks shutdown, and fails soft on DB hiccups. The event timeline is the
evidence trail: a shop that may need it for chargebacks raised more than a
year later should raise days.
Weekly report. Every Monday at 08:00 (server-local time) the worker emails a short report for the previous seven days: emails tracked, opens recorded, link clicks, bounces and complaints caught, and the open rate — each with the change against the week before — followed by up to three next steps taken from the set-up checklist and a link to the Email Log page. Trial and free-tier installs also see what a licence switches on. The report is sent once per install (safe with several workers).
GET /email-track/digest/settings,
POST /email-track/digest/settings { enabled?, recipient? },
POST /email-track/digest/send-test { to? }, GET /email-track/digest/preview.SMTP_SERVER (or SMTP_HOST), SMTP_PORT, SMTP_USER,
SMTP_PASSWORD (or SMTP_PASS) and SMTP_FROM environment variables
through nodemailer (already a peer dependency). With no SMTP host set
the report is simply not sent; every failure is logged, never thrown.hulo_plugin_prefs table (one row per
plugin and key), created at boot if missing.Premium (0.17.0). The weekly report and the set-up checklist need a
licence or the evaluation: without one the report is not sent (the
scheduler skips its run), GET /email-track/setup, the digest preview,
test send and settings changes answer 402, and GET /email-track/digest/settings
reports locked: true. The settings are kept and work again with a key.
Set-up checklist. The first card on the Email Log page
(GET /email-track/setup) runs four real checks: the tracking sender is
wrapped (a log row in the last 30 days), publicBaseUrl points at a public
host, a bounce webhook secret is configured, and at least one open or
click has been recorded. Each row has a hint and a docs link; Hide
puts it away in that browser once everything is done, and it comes back if
a check fails again. The undone items are the weekly report's tips.
Dashboard widget (free). Dashboard → Add widget → Email Tracking shows
emails tracked, opens, clicks and failed or bounced (failed for good, bounced or complained) for the last 7 days (GET /email-track/widget),
the licence notice when a trial or key is about to end, and an
"Open Email Tracking" link. Needs the ReadCustomer permission, like the
page.
Usage stats. The same five figures for the last 30 days
(emailsTracked, emailOpens, emailClicks, emailsBounced,
openRatePct — counts only, never addresses) go with the evaluation ping
and the daily heartbeat so renewal and trial emails can say what the
plugin did. HULO_HEARTBEAT_DISABLED=true stops the heartbeat as before.
| Permission | Grants |
|---|---|
ReadCustomer | the Email Log page, its list / detail / summary endpoints, the customer Emails tab, the order's email list, the widget, licence status, the suppression list, the tracking settings (read), the privacy export |
UpdateCustomer | adding and lifting suppressions, weekly-report settings, the trial reminder |
DeleteCustomer | the privacy erase |
ReadOrder and ReadCustomer | order activity, its CSV / JSON exports and the evidence report link |
ExportEmailEvidence | the full export (activity.json?full=1): every stored column, payloads, full user agents. Registered by the plugin (Settings → Roles); SuperAdmin has it |
SuperAdmin | licence activation / purchase / billing portal, the in-app update, saving the tracking settings |
Without any of the 0.16.0 options below, this version calls exactly what 0.15.4 did:
elite.charity): the evaluation registration
(daily while unlicensed), the heartbeat (daily; HULO_HEARTBEAT_DISABLED=true
stops it), the revocation list (weekly) and — only when an admin starts a
purchase or opts in — the purchase claim and the trial reminder (which
sends the address the admin typed). Usage figures are numbers only; no
customer data is sent.raw.githubusercontent.com) — only when geolite2-redist is
installed (it is not a dependency of this plugin; the visitor-analytics
plugin brings it): its auto-updater fetches the GeoLite2 database checksum
(and, when it changed, the database) from the GitSquared/node-geolite2-redist
repository the first time an open or click from a public IP is looked up,
then every 48 hours. Nothing about the open or click is sent. If GitHub
cannot be reached, lookups return no location after waiting at most one
second, and recording carries on.Opt-in, 0.16.0:
ipEnrichment. Sent: the IP address of an
open or click (nothing else), once per IP per cacheTtlMs, never for
private or reserved addresses. ipinfo.io:
terms, privacy.
ip-api.com: terms and privacy; the free
endpoint is plain HTTP and for non-commercial use only. A custom lookup
is your own code.providerWebhooks.ses: the signing certificate
named in a message whose topic is on your list and whose timestamp is
fresh (only from the topic's own https://sns.<region>.amazonaws.com,
written exactly as AWS writes it, 5 s timeout, at most 64 KB read, cached;
a failed fetch is not retried for 15 s; at most 2 new certificate URLs a
minute from one client address and 60 a minute in all, so one address
that knows a topic ARN cannot use up the fetches the real SNS deliveries
need after a restart or a certificate rotation — it would take 30
addresses, and a certificate already cached still serves, also past its
24 hours),
and the subscription confirmation URL (unless
autoConfirmSubscription: false).
AWS service terms, privacy.The provider webhooks themselves are inbound: Postmark, SendGrid, Mailgun and SNS call you.
| Method | Path | Auth | Purpose |
|---|---|---|---|
GET | /email-track/open/:token.gif | public | tracking pixel |
GET | /email-track/click/:token?u=… | public | click redirector |
POST | /email-track/bounce | HMAC | bounce / complaint webhook (application/json, 100 KB) |
POST | /email-track/webhook/:provider | provider signature | postmark, sendgrid, mailgun, ses delivery events (404 unknown and 429 failure allowance used up — before the body is read; by slug, whether configured or not: 415 compressed or not JSON, 413 over 1 MB (SendGrid, Postmark) / 320 KB (SES) / 256 KB (Mailgun), 400 nested over 32 levels or over 1 000 arrays and objects (Mailgun, SES), 408 slow body; 401 unconfigured or bad signature; 429 verified allowance used up; 204 accepted) |
GET | /email-track/orders/:orderId/activity | ReadOrder + ReadCustomer, premium | timeline page: filter, cursor, take, order |
GET | /email-track/orders/:orderId/activity.csv | ReadOrder + ReadCustomer, premium | redacted CSV of the timeline; ?filter= narrows it |
GET | /email-track/orders/:orderId/activity.json | ReadOrder + ReadCustomer, premium | redacted JSON + timelineSha256 (null when filtered); ?filter=; ?evidence=1[&internalNotes=1] the PDF's items; ?full=1 (every stored column) also needs ExportEmailEvidence |
POST | /email-track/orders/:orderId/evidence-link | ReadOrder + ReadCustomer, premium | a 5-minute signed URL for the PDF; body { "internalNotes": true } to print private notes |
GET | /email-track/orders/:orderId/evidence.pdf | signed URL (exp, uid, notes, sig) | the evidence report PDF (403 tampered, widened or expired) |
GET | /email-track/log | admin | paginated list with filters (status stored, state how the send went — both one or comma-separated —, fromDays days or all); rows carry state, attempt, retryOf, retriedBy |
GET | /email-track/log/summary | admin | counts per state and their total, over the list's filters and period (fromDays, default 30, or all), plus deliveryEvents and deliveryEventsReason |
GET | /email-track/log/:id | admin | full detail incl. opens + clicks (:id digits only, else 404) |
GET | /email-track/log/stats/by-template | admin, premium | per-template aggregates (MySQL / PostgreSQL) |
GET | /email-track/log/export.csv | admin, premium | CSV export |
GET | /email-track/suppression | admin | list suppressions (q, take, skip; total) |
POST | /email-track/suppression | UpdateCustomer | add a suppression (one address) |
DELETE | /email-track/suppression/:recipient | UpdateCustomer | lift a suppression |
GET | /email-track/settings | admin | tracking switches and trusted proxies |
POST | /email-track/settings | SuperAdmin | { trackOpens?, trackClicks?, trustedProxies? } |
GET | /email-track/privacy/export?email= | admin | everything held about one address (JSON) |
POST | /email-track/privacy/erase | DeleteCustomer | { email, confirm: true } — erase its emails and events (suppression kept) |
GET | /email-track/status | admin | version + licence + update status |
GET | /email-track/licence/status | admin | licence/evaluation state, lifecycle notice, premium features, recent stats |
POST | /email-track/eval/remind-me | admin | { email } — trial-ending reminder opt-in |
GET | /email-track/setup | admin, premium | set-up checklist |
GET | /email-track/widget | admin | dashboard widget figures (7 days, incl. failed or bounced) |
GET | /email-track/digest/settings | admin | weekly report settings (locked without premium) |
POST | /email-track/digest/settings | admin, premium | { enabled?, recipient? } |
POST | /email-track/digest/send-test | admin, premium | { to? } — send this week's report now |
GET | /email-track/digest/preview | admin, premium | this week's report as HTML |
One new column, email_log.machineCount (int, default 0). Hosts with
synchronize: true get it automatically; otherwise add it before the
upgrade:
Behaviour changes to check:
status: "bounced" without
bounceType now gets 400 — add bounceType: "hard" or "soft". Other
statuses (delivered, opened, …) were wrongly recorded as bounces before
and are now refused.password-reset instead of email-verification for a subject that said
"verify your password").One new table, email_event; nothing else changes in the schema
(delivered is a new value of the existing email_log.status column).
Hosts with synchronize: true get it automatically. On synchronize: false
create it before (or with) the upgrade — this is exactly what TypeORM
generates for the entity, so vendure migrate / a generated migration
reports no further changes for email_event afterwards. Until the table
exists the plugin logs one warning (and the daily retention sweep notes
that email_event was not pruned) and keeps working as 0.15.4 (no event
rows, an empty order timeline apart from legacy entries and order history).
Time zones: run the Node process and the database session in the same time
zone (UTC recommended). The timeline merges times this process writes
(email_event.occurredAt) with times the database sets itself (Vendure's
order history, email_log.createdAt); on timestamp without time zone /
datetime columns they agree only when both use the same zone, and the
evidence report prints them as UTC. The plugin compares the database's
LOCALTIMESTAMP with its own clock at boot and logs a warning when they are
two minutes or more apart.
email_link.linkToken is now declared unique once (its unique index
IDX_d58a6a97b688ff39bf86a0f051) instead of twice: since 0.14 a fresh MySQL /
MariaDB database with synchronize: true failed to boot ("Duplicate key
name"). Existing MySQL / MariaDB tables already have exactly that index, so
nothing changes there. On PostgreSQL the old column-level declaration also
created a unique constraint (UQ_d58a6a97b688ff39bf86a0f051b); a generated
migration drops that now-redundant constraint (the unique index stays), and
synchronize hosts drop it on their own. Nothing else is needed.
MySQL / MariaDB:
PostgreSQL:
Re-send every active key on file at elite.charity/licence/forgot.
User manual + screenshots: huloglobal.com/vendure-plugins/email-tracking/docs/
Commercial. Buy at elite.charity/licence/buy/vendure-plugin-email-tracking.
All notable changes to @huloglobal/vendure-plugin-email-tracking are
documented here. The format follows
Keep a Changelog and this project
adheres to semantic versioning.
@nestjs/common
12.5, nodemailer 6.10, typeorm 0.3.30, typescript 5.9, vitest 2.1.9 and types).@huloglobal/vendure-licence-sdk. It never wraps or restyles the e-mails your store sends; it only adds
the open pixel and click redirects you have switched on.Parity with the WordPress plugin: the core of email tracking is free, the
bounce webhook is strict, and the suppression list is enforced on every send.
One new column (email_log.machineCount; README → Upgrading to 0.17.0).
GET /email-track/setup, the digest preview, test send and settings
changes answer 402; digest/settings reports locked).PREMIUM_FEATURES now lists exactly what is gated: per-template rates,
CSV export, the order activity timeline and PDF evidence report, provider
delivery / deferral / unsubscribe / engagement events, the weekly report,
the set-up checklist. It is exported from the package index.complained used to be recorded as a bounce, so a relay forwarding
a delivery or an open put a working address on the suppression list, and a
comma-joined To list was suppressed as one string. Now only bounced with
bounceType hard / soft (and their synonyms) or complained is
accepted — anything else is 400 and changes nothing; a hard bounce or a
complaint suppresses the address the report names (recipient, which
must be one of the email's recipients) or the email's only recipient, and
nobody when several were addressed and none is named. The answer adds
suppressed. recordBounceReport() returns { matched, suppressed };
recordBounce() keeps its boolean.sendTracked(), and only with premium; TrackingEmailSender
never checked it. Both paths now drop suppressed addresses (the email is
not sent when nobody is left: a suppressed row and event, no job retry),
in every tier. A password reset is exempt (suppressionExemptTypes,
default ['password-reset']), decided by the type the sender gave, never
the subject. Suppression rows are always bare lower-cased addresses.TrackingEmailSender logs the event handler's type
and the order from its template variables instead of guessing from the
subject (subject guessing stays only as the label of mail sent outside the
job). withEmailContext() labels your own sends.apple-network + ampp) are recorded but not counted in
openCount / clickCount; email_log.machineCount counts them. Image-proxy
opens (Gmail, Yahoo, Outlook) still count.GET /email-track/suppression takes q, take, skip and returns a real
total; POST accepts exactly one address. The GraphQL mutation
validates the same way.trackOpens,
trackClicks, and Email Log → Settings). Off: no pixel / no link
rewriting on new mail, nothing recorded for new hits; old links keep
working.trustedProxies (IPs / CIDR, IPv4 and IPv6) plus an
admin-editable list. When set, proxy headers are believed only from those
addresses and X-Forwarded-For is walked past them.GET /email-track/privacy/export
(ReadCustomer) and POST /email-track/privacy/erase { email, confirm: true }
(DeleteCustomer), with an admin card. The suppression entry is kept on
erase and reported as retained.GET / POST /email-track/settings (POST: SuperAdmin). A save that cannot
be written to hulo_plugin_prefs is reported (500), never shown as saved.EmailProcessor, switches, premium digest, B7 on TrackingEmailSender.machineCount and privacy export / erase end to end.ET_E2E_DB_*): settings persisted
in hulo_plugin_prefs, machine counting, suppression + bounce + privacy,
the weekly report gate.isAdminApiSession from the licence SDK 0.15.6, the same rule as Vendure's own AuthGuard). The admin UI
is unaffected; administrators logged in before the 3.8 upgrade log in again once, as Vendure already
requires. No change on Vendure 3.5 to 3.7.@nestjs/graphql 14, Apollo Server 5), as well as 3.5 to 3.7.
The peer range stays @vendure/core >=3.5.0 <4.0.0; nothing here needs 3.8.@huloglobal/vendure-licence-sdk ^0.15.6.Honest email outcomes on the order card and in the Email Log. No schema change and no stored status is rewritten: every view now reads a send attempt together with the other attempts of the same email (README → Send attempts).
delivered, so a shop
sending through plain SMTP (Gmail, for one) always read "0 delivered". The
"Email activity" card and the activity page now count emails accepted
by the mail server, and show "delivered" only when a provider webhook is
configured and its deliveries are recorded (not on the free tier;
summary.deliveryEvents on
GET /email-track/orders/:orderId/activity). The evidence PDF says
"accepted by the mail server" and "delivery not reported (no provider
webhook is configured)".email_log row is written
before SMTP starts, as sent. Until the reply or the error is recorded
(and for at most 15 minutes) it now reads "Sending…": on the order
card and timeline, in the exports and the PDF, and as state sending in
the Email Log, whose Sent card no longer counts it (nor do By template and
the weekly figures). When nodemailer's reply cannot be captured, the
sender records an empty one, so a finished send never reads as sending.
A send that still has no reply after 15 minutes was cut off (for example
by a worker restart mid-SMTP): it reads "No reply recorded" (state
unknown) and is not counted as sent. When the send job runs it again,
the two attempts are linked like a retry ("No reply recorded, retried",
then "Sent after 1 retry"). Rows from before the event timeline began
(no reply was recorded before 0.14.3) keep their stored status.log, without the badge.retriedBy, "retried as
email #…" in the detail) and "Sent after 1 retry" (retryOf). "Send
failed" now means a permanent refusal (SMTP 5xx or any other error) with
no later attempt, or that the retries are over (no new attempt within 15
minutes, or the sixth attempt failed: "Send failed after 5 retries"). The
card counts each email once ("1 email (2 attempts)"), with sending,
retrying, deferred, no reply recorded, failed and suppressed figures when
there are any.huloEmailStatsByTemplate too. A search by
recipient, type, customer or order keeps the chosen period and says so
("Searching the last 30 days", with Search all time). Every refused
attempt in the period is read with its retry, newest first, so a long
period ("Last 365 days", "All time") counts a retried email as retried
however many were refused before it.LOCALTIMESTAMP on MySQL, MariaDB and
PostgreSQL), so a database in another time zone no longer turns a send in
flight into a sent one or a temporary refusal into a failure; the Email
Log period and By template count back from it too.0100018b…), which was read as reply code 100018. A
reply without an SMTP reply code is now sent, in TrackingEmailSender
and sendTracked. Rows stored before 0.16.3 keep their failed status.GET /email-track/log and log/export.csv: state= (one or several of
sending, sent, delivered, deferred, bounced, complained, suppressed,
retrying, retried, failed, unknown) and fromDays= (days, or all).
List rows carry state, attempt, retryOf and retriedBy; the CSV
export ends with a state column. status= still filters the stored
status.GET /email-track/log/summary takes the list's filters (recipient,
type, customerId, orderCode, fromDays — default 30, or all) and
returns sending, retrying, retried, unknown, deliveryEvents and
deliveryEventsReason (no-webhook or free-tier when deliveries
cannot be reported); failed and deferred count what was not retried,
and total still counts every row. The period is bound as a date, as the
list binds it.summary.emails has attempts, sending, retrying,
deferred, unknown, failed and suppressed, and total and sent
count emails (a retried one once); the card and the activity page show
the non-zero ones. deliveryEvents is false on the free tier, which does
not record a provider's deliveries. Send items have sendState, retryOf
and retriedBy. The evidence report's timeline SHA-256 covers them, so it
differs from a 0.16.2 export of the same timeline. The PDF marks rows
read from the email log after the event timeline began ("from email
log") and explains "Sending…", "No reply recorded" and the retry labels.license field is now AGPL-3.0-only, matching LICENSE, which grants the GNU Affero
General Public License version 3 (it said AGPL-3.0-or-later). Published npm builds remain under the
separate commercial licence described in LICENSE. No code changes.Delivery evidence: every email event is now recorded as its own row, the
order page shows an email activity timeline with exports and a PDF evidence
report, and provider delivery webhooks are verified and ingested. One new
table (email_event); email_log is unchanged. Hosts on synchronize: false
must create the table first — see README → "Upgrading to 0.16.0". Without new
options the plugin behaves as 0.15.4 apart from the new event rows and admin
panels and the changes listed below: no new third-party calls, no provider
webhook accepted, same link format. One counting change: opens and clicks
through bare (unsigned) ids are recorded as unverified events only and no
longer counted in email_log (see Security).
email_event). One row per event, never deduplicated:
send outcomes (sent, failed, deferred, suppressed) from TrackingEmailSender
and sendTracked; every pixel open and every click — up to 100 of each per
email per UTC day (10 through bare ids), after which one marker row
(reason events-capped, with the count it saw) stands for the rest of the
day while signed hits keep incrementing the email_log counters; a server
process records one email's hits one at a time, so a burst cannot pass the
count together; bounces from
/email-track/bounce; provider events; manual suppressions by an
administrator. Rows carry the order / customer / channel links of the email,
the canonical IP as stored (raw, or hashed per hashIpsInHistory) plus
ipHash (hashes are HMACs keyed with ipSalt, or with the signing secret
when ipSalt is unset), the local GeoLite2 location, the parsed client, the
clicked URL (secrets and email addresses redacted) with link index and
text, the bounce or SMTP detail and a small sanitised provider payload
(never a message body; the recipient only as a keyed hash, and every email
address in SMTP / provider text replaced by <address>, message ids
excepted). Writes are best-effort: a failed event row never affects a
send, a pixel or a redirect. The existing email_log counters and
opensJson / clicksJson are written as before, except for bare-id hits
(see Security).classification + reason codes such as gmail-proxy, safelinks, bot-ua,
datacentre, vpn) from the licence SDK classifier; re-classified when IP
enrichment adds network flags. A hit through a bare (unsigned) id is
unverified instead — never human or machine — in the JSON, the UI and
the PDF.POST /email-track/webhook/:provider for postmark
(HTTP Basic auth), sendgrid (signed event webhook), mailgun (signed HTTP
webhooks) and ses (Amazon SES through SNS), configured with the new
providerWebhooks option. Mapped events: delivered, deferred, hard and soft
bounces (SES Permanent / Transient, SendGrid bounce / blocked, Mailgun failed
permanent / temporary, Postmark HardBounce / SoftBounce / Transient …),
complaints, dropped / rejected and unsubscribes; provider opens and clicks
only with recordEngagement: true (recorded, never counted in email_log;
a click on one of the plugin's own tracked links is stored as its
destination, redacted, with its link index and text). Retries are
idempotent (unique dedupeKey from the provider's event id); when a
status or suppression update fails, the event row is removed again and the
answer is 500, so the retry is processed in full.
Events are matched to the email by a correlation header the sender adds only
for configured providers (SendGrid X-SMTPAPI unique_args, Mailgun
X-Mailgun-Variables, Postmark X-PM-Metadata-hulo-log-id, SES
X-SES-MESSAGE-TAGS; the value is the email_log id with an HMAC of the
install's signing secret, so a provider account shared with another shop
cannot link its events to your emails), then the Message-ID, then the
provider id parsed from the SMTP reply. The JSON headers are handed to
nodemailer prepared, so they go out as raw JSON rather than RFC 2047
encoded-words; the Postmark metadata key is read whatever its case. Hard
bounces, complaints and drops for a bad address (SendGrid: exactly
"Bounced Address", "Invalid" or "Spam Reporting Address") add the recipient
to the suppression list — also when no email matched; soft bounces,
deferrals and other drops ("Invalid SMTPAPI header", "Unsubscribed
Address", …) never do; unsubscribes are recorded only. Bounces and
complaints are processed in every tier, delivered / deferred / unsubscribe
/ engagement events need premium access. Per-IP limits of their own
(providerWebhooks.rateLimit): failed requests spend a failure allowance
(default rateLimit, 60 a minute) that is checked before a body is read;
verified requests spend only a per-provider verified allowance (default
1 200 a minute).delivered status on email_log, with a fixed precedence for every
status update (sent < deferred < delivered < bounced < complained < failed < suppressed), applied in one guarded UPDATE that always equals the
precedence: a provider "delivered" moves sent / deferred to delivered and
never overwrites bounced, complained or failed. A provider drop for a
reason other than a bad address moves only sent / deferred to failed.ipEnrichment
option: { provider: 'ipinfo', token }, { provider: 'ip-api', key? } or
{ provider: 'custom', lookup(ip) }, plus cacheTtlMs (default 24 h) and
maxLookupsPerMinute (default 40 for the free ip-api endpoint, else 120).
Asynchronous after the event row is written; adds country, region, city,
ASN, organisation, timezone and proxy / VPN / Tor / datacentre / mobile
flags, with the location merged as a unit (GeoLite2 first; the provider's
city only for the same country); private and reserved addresses (incl. the
IPv4-mapped, NAT64 and 6to4 forms of private IPv4) are never sent; only the
validated, canonical address is looked up (no %zone suffixes), cached per
address; over-budget lookups are dropped, not queued; 5 s timeout; every
value clamped to its column (the AS number only). A boot warning explains
the free ip-api endpoint's terms (HTTP, 45/min, non-commercial).GET /email-track/orders/:orderId/activity merges the
order's email events, legacy rows synthesised from email_log for emails sent
before 0.16.0 (marked legacy; no backfill runs) and Vendure's order history
(state, payment with amounts, fulfilment, refund, cancellation, modification,
coupon, customer changes and notes — each note whole —, private ones
included). Filters all /
emails / opens / clicks / delivery / order / notes, cursor pagination (100 by
default, order=desc for the latest first) and a header summary (order,
customer, total in the host's MoneyStrategy precision, payment state,
emails sent / delivered / opened with the first open / clicked / bounced or
complained — from the email_log counters, which bare-id hits never move —
and human vs machine opens and clicks, unverified ones apart). History
is read in pages no larger than the API's list limit, and a response says
historyUnavailable: true (the page and the PDF show a notice) when it
could not be read. Needs ReadOrder and ReadCustomer, is scoped to the
admin's channel (404 outside it) and is premium (402 unlicensed).activity.csv (redacted: IP as stored, sensitive URLs
redacted, no payloads; every cell quoted with the formula-injection guard;
UTF-8 byte-order mark), activity.json (redacted, with timelineSha256) —
both take ?filter=, name it in the file name and then return
timelineSha256: null —, activity.json?evidence=1 (&internalNotes=1):
exactly the items the PDF prints, with the hash printed on it, and
activity.json?full=1 — every stored column, provider payloads and full
user agents — behind the new ExportEmailEvidence permission
(Settings → Roles; SuperAdmin has it).POST /email-track/orders/:orderId/evidence-link: a 5-minute HMAC-signed
URL (order id, expiry, admin user id and the internal-notes choice, signed
with the active signing secret) to GET …/evidence.pdf, which needs no
session, so it opens in a new tab under bearer-token auth. A4, generated by
a built-in dependency-free PDF writer: order and customer header,
generated-at (UTC), generated-by and whether internal notes are included,
summary (bare-id hits on a line of their own, not counted in any figure),
the timeline table, a "How to read this report" note, page numbers and the
SHA-256 of the canonical JSON of the printed items, which matches a later
activity.json?evidence=1 export of the unchanged timeline. Private
(internal) order notes are left out unless the link was minted with
{ "internalNotes": true } (then printed as "Note (internal)"); order
history of a type the plugin does not know shows its type only. Clicks
name their link ("Link #2: …"). A cell longer than a page (about 85
lines, some 4 000 characters of text) is cut with "… (truncated, N more
characters: see activity.json)" — N counts every character after the
lines shown, spaces and line breaks included — its author line kept; the
SHA-256 line and its explanation are never split across pages. Characters
outside WinAnsi print as a stand-in (→ as ->, Ł as L) or, for
other scripts, as ?./extensions/email-log/orders/:orderId) with filters, classification
badges ("Unverified" for bare-id hits) and reason chips, approximate
location under a cautionary note, the clicked link, Load more, Export CSV
(of the active filter), notes with their line breaks, PDF with an
"Include internal notes" choice and —
for admins with ExportEmailEvidence — Full export (downloads named as the
server names them, date included), and an error state with Try again; the
per-customer Emails tab on the customer detail page (the README
promised it; it now exists; its seven columns fit a 1280 px screen); an
"activity" link on Email Log rows linked to an order. On an unlicensed
install the premium screens show their notice without calling a premium
endpoint (no 402 in the browser console). Dates follow the admin UI
locale; status colours meet WCAG AA, also in the dark theme, and the
premium notice's link is underlined in the notice colour; the page title is
the page's h1; the activity page fits a 390 px screen (its table scrolls
inside its box, the summary cards wrap long addresses).LOCALTIMESTAMP, read through
the driver) and the process's differ by two minutes or more — different
time zones make the timeline mix two clocks. README → Upgrading: run both
in the same zone, UTC recommended.EmailEvent, EmailEventService, OrderActivityService,
exportEmailEvidencePermission, the option and event types. The plugin
module exports EmailTrackingService, EmailEventService,
EmailLinkService and OrderActivityService, so a host plugin that
imports EmailTrackingPlugin injects the plugin's own instances (README →
Universal capture).clicksJson) have secrets redacted:
https://host/path?[redacted] when the URL carries user info, a query
parameter whose name holds a secret (token, code, key, sig, signature,
auth, password, reset, otp, session, sid, jwt, apikey, pin, magic, nonce,
hash, ticket, …), a parameter whose value is a URL that does
(?next=/reset?token=…, also encoded), a key=value fragment, or an
account-action path (reset, verify, confirm, login, magic, auth, invite,
unsubscribe, …) with a query; token-like path segments after such a segment
become [redacted]. The redirect still goes to the real URL. The Email Log
detail shows click history written before 0.16.0 redacted the same way./email-track/bounce applies the status precedence: a soft bounce no
longer turns a bounced, complained or delivered email back into
deferred, and a hard bounce no longer overwrites a complaint. Each call
is also recorded as an event (a retried call with the same facts once)./email-track/bounce takes application/json only (415 otherwise) and at
most 100 KB (gzip / deflate still inflated) — what the global parser
accepted before, minus form posts.unverified event
only — reason unsigned-token, never enriched — and no longer increments
openCount / clickCount, sets firstOpenedAt / firstClickedAt or
joins opensJson / clicksJson; a bare id of an email whose own links
were signed is not recorded at all. The pixel and the own-host redirect
are still served. Without any secret, every link is a bare id and is
counted as before.geolite2-redist is installed) loads its
database once per process and waits for it at most one second: its
updater resolves only after reaching GitHub, and when GitHub could not be
reached every public-IP open went unrecorded and click redirects hung
(also in 0.15.x).sent, in one
guarded UPDATE (sendTracked and TrackingEmailSender).log/export.csv and the order activity CSV) quote every cell
and start with a UTF-8 byte-order mark.delivered and suppressed); Sent shows sent + delivered and filters
on both, with new Delivered, Complained and Suppressed cards.
GET /email-track/log/summary returns total, delivered and
suppressed; status on the list and CSV export takes a comma-separated
list. Its two tables scroll inside their own box, so the page no longer
stretches the admin wider than the screen (it did from 390 px up to
1280 px).email_event (older than days — at
least 3 — the events of emails maxRows removes, and under maxRows the
unlinked events older than the oldest email kept), in the same batches.EmailTrackingService.recordClick() takes an optional fifth argument with
the link's index and text, and recordOpen() / recordClick() an optional
last { signed }; existing callers are unaffected. Its constructor's new
EmailEventService dependency is optional: a host plugin that lists
EmailTrackingService in its own providers, as 0.15.x hosts do, still
boots, and its instance writes the timeline through an event writer of its
own.ipSalt is not set: the email_log IP hashes then use
the public default salt. The option docs no longer say hashed IPs cannot be
de-anonymised.GET /email-track/log/export.csv) never
answered since it was added in 0.3.0: GET /email-track/log/:id, declared
before it, took the request and replied 400 "Invalid id". The fixed
log/… routes are declared first now, and log/:id takes digits only
(anything else is 404).synchronize: true failed to boot
("Duplicate key name 'IDX_d58a6a97b688ff39bf86a0f051'"): email_link.linkToken
was declared unique twice (since 0.14). It is declared once now; existing
tables keep their index — see README → "Upgrading to 0.16.0" for the
redundant PostgreSQL constraint a generated migration drops./customers/:id, a route Vendure 3 does
not have; it opens the customer's Emails tab.Connection: close) — so nothing reveals which
providers are enabled. An unconfigured SendGrid, Postmark or Mailgun also
runs the signature check a configured one would, against throwaway
credentials, so the time the check takes does not reveal it either.
Per-IP limits: only rejected requests spend the failure allowance
(checked before a body is read), verified ones a per-provider allowance of
their own, so junk cannot throttle real bounces and complaints.
Postmark: Basic credentials compared in constant time (both halves always
compared). SendGrid: ECDSA P-256 / SHA-256 over the timestamp header plus the
exact raw request body, key accepted as base64 DER or PEM, anything but an EC
P-256 key refused — never a re-serialised body; a timestamp more than 72
hours from now is refused, so a captured request cannot be replayed later.
Mailgun: HMAC-SHA256 over timestamp + token in constant time, timestamps
more than 15 minutes off rejected, and a bounded replay cache refuses a
token seen before — the token is reserved the moment it verifies, so
concurrent requests replaying one signature with other event data are
refused too (released if processing fails, so Mailgun's retry passes; the
cache is per server process). Amazon SES: the SNS message signature is
verified (SignatureVersion 1 SHA1withRSA, 2 SHA256withRSA) over the
canonical string for its Type; the body's TopicArn must be on
ses.topicArns and its Timestamp at most 24 hours old before anything is
fetched; SigningCertURL must be https on exactly the topic's own
sns.<region>.amazonaws.com(.cn) with a /SimpleNotificationService-<hex>.pem
path (no other host under amazonaws.com, such as an S3 bucket called
"sns"), written in canonical form (no :443, dot-segments, encoded dots
or embedded tabs: each spelling would be its own cache entry and fetch),
and is fetched with a 5 s timeout, no redirects and a 64 KB cap enforced
while streaming, then cached; a failed fetch is remembered for 15 s,
concurrent messages share one fetch, and at most 2 new fetches a minute
per client address and 60 a minute in all run (an expired cached copy of
the same certificate serves meanwhile), so unsigned messages naming
made-up certificate URLs from one address that knows a topic ARN cannot
use up the fetches the real SNS deliveries need after a restart or a
certificate rotation (it would take 30 addresses); the certificate must be
within its validity dates. The spoofable
x-amz-sns-topic-arn header is never trusted, and a SubscribeURL is
fetched only after verification, only on the topic's own SNS host with
Action=ConfirmSubscription for the same topic
(autoConfirmSubscription: false logs it for manual confirmation
instead)./email-track/webhook and
/email-track/bounce as beforeListen middleware (the way Vendure's
StripePlugin does). Before reading a byte it answers 404 for an unknown
provider and 429 for an address that has used up its failure allowance
(and, on the bounce route, 429 over the rate limit), and it closes the
connection rather than draining. Webhook bodies, by slug and never by
configuration: application/json (text/plain for SNS only), no
compression, at most 1 MB (SendGrid, Postmark), 320 KB (SES) or 256 KB
(Mailgun). SendGrid and Postmark carry their signature or credentials
outside the body, so their body is parsed only after verification: an
unauthenticated request never costs a JSON parse. Mailgun and SNS sign
fields inside the body, so it is parsed first — after a byte scan that
refuses (400, charged to the failure allowance) a body nested deeper than
32 levels or holding more than 1 000 arrays and objects, the shapes that
make JSON.parse slow (a real Mailgun event has about 25, an SNS envelope
4). Bounce bodies: application/json, at most 100 KB (compressed bytes
counted too). Every body must arrive within 10 s (408). The bounce HMAC is
checked over the exact bytes; a signature over the compact JSON form, which
is what 0.15.x verified, is still accepted so existing senders keep working.url, Postmark OriginalLink, Mailgun url, SES click.link)
are unwrapped from the plugin's own tracked links and redacted before they
are stored, so a reset or magic-link token never reaches the database, the
exports or the PDF. The full export of legacy click history is redacted
too.email_event IP and recipient hashes are HMACs keyed
with ipSalt or, when it is not set, the install's signing secret (never
the public default salt once a secret exists). The link fingerprints in the
send event are HMACs keyed with the signing secret and taken over the
redacted URL of a sensitive link, so a short code cannot be recovered from
an export or a database copy.= + - @ is neutralised also after spaces or invisible characters.%zone suffix is refused); NAT64 and 6to4
addresses are classified by the IPv4 address they embed.unverified events only
(never enriched, at most 10 per email per type per day), never counted in
email_log — so enumerating ids cannot move the opened / first open /
clicked figures of the Email Log, the order summary or the evidence
report — and ignored entirely for an email whose links were signed.email_event without bound.<address> before an event is stored (bounce diagnostics often quote the
recipient); a recorded URL whose query holds an address is redacted.Cache-Control: private, no-store;
every admin REST response also carries the licence SDK's security headers
(the README promised those, but only the weekly-report preview had them).
GET /email-track/log/:id takes digits only: since 0.1.0,
/email-track/log/1.csv (or .pdf, .css, .js, .jpg) returned the
full detail of email 1 — recipient, subject, SMTP reply, IPs, user agents,
opens and clicks — as uncached JSON, under a URL that a CDN caching by file
extension (Cloudflare's default) could store and serve to anyone after a
signed-in admin merely opened a crafted link to the shop.<id>.<hmac> token on
/email-track/click/:token?u=… authenticated only the email, not the
destination, so anyone holding one tracked email (or any link from it)
could swap u for any http(s) URL and use the shop's domain to redirect to
a phishing site whenever clickRedirectAllowedDomains was empty (the
default). Rewritten links now carry s, an HMAC over the token and the
destination; a link without a valid s (bare legacy ids, and links in
emails sent before 0.15.3) only redirects to the shop's own hosts
(publicBaseUrl, trackedHosts, clickRedirectAllowedDomains).
Behaviour change: old emails whose links point at third-party sites now
get a 400 for those links; add the domains to clickRedirectAllowedDomains
to keep them working.X-Forwarded-For. With trustedIpHeaders including
x-forwarded-for, the left-most entry (written by the client itself) was
used, so a fresh spoofed value per request bypassed the per-IP rate limit
on the pixel, click and bounce endpoints and poisoned stored open/click
IPs. The right-most public hop (the one your proxy appended) is used now.GET /email-track/log/:id and the
huloEmailLog / huloEmailStatsByTemplate admin queries ignored the
channel scope the list views apply, so a channel admin with ReadCustomer
could read another channel's emails (recipient, subject, context, opens and
clicks) by id. They now see only their channel; the default channel still
sees everything.Retention pass: the plugin now tells the merchant what it did for them and
walks them through finishing the set-up. One new table (hulo_plugin_prefs,
shared by every HULO plugin; created fail-soft at boot). Requires
@huloglobal/vendure-licence-sdk 0.15.0.
SMTP_SERVER/SMTP_HOST, SMTP_PORT, SMTP_USER,
SMTP_PASSWORD/SMTP_PASS and SMTP_FROM environment (the plugin has no
mailer of its own); without SMTP nothing is sent and nothing breaks. The
recipient defaults to the licence's customer email, else the address given
for the trial reminder. Admin endpoints under /email-track/digest/:
GET settings, POST settings ({enabled?, recipient?}), POST send-test ({to?}) and GET preview (HTML). The Email Log page has a
"Weekly report" card (toggle, recipient, last/next send, Send me a test,
Preview).GET /email-track/setup: sender wrapped (a log row in the last 30 days),
publicBaseUrl set to a public host, bounce webhook secret configured,
first open or click recorded. The undone items become the weekly report's
tips. "Hide" (per browser) once everything is done; the card returns if
an item comes undone.GET /email-track/widget.emailsTracked, emailOpens,
emailClicks, emailsBounced and openRatePct for the last 30 days
(numbers only, no addresses) go with the evaluation ping and, from this
version, with the daily heartbeat too, so renewal mail can say what the
plugin did. HULO_HEARTBEAT_DISABLED=true still stops the heartbeat.GET /email-track/licence/status now carries
notice (trial ending / key expiring / evaluation ended),
premiumFeatures and recentStats (top three non-zero 30-day figures).
The licensed banner shows "renews automatically — current key valid
until POST /email-track/eval/remind-me
{email}, forwarded to the licence server and kept as the report's
default recipient), the premium feature list and a "So far: …" line; the
free banner shows the same with "During your evaluation: …" once the
evaluation has run.premium-feature, licence-required or licence_required) renders one
message in the admin: "Follow-up to the 0.14.2 hardening pass. No new tables or columns.
signingSecret a random
per-install secret is generated once at boot and stored in
hulo_licence_store (key vendure-plugin-email-tracking:signing-secret;
first writer wins so server and worker sign and verify alike), then
applied as if configured. Bare-id links in already-sent emails behave
exactly as in 0.14.2 (pixel served, clicks to own hosts only). A boot
warning explains that setting signingSecret keeps links valid across
reinstalls. A generated secret is never used to authenticate the bounce
webhook./email-track/click/:token accepts the
64-hex tokens minted by EmailLinkService.issueLinkToken() (?u=…&s=…):
the row must exist and be unexpired, and both the HMAC and the stored
destination hash must match, so the token binds its URL. Sensitive links
are recorded by their redacted form. EmailLinkService signs with the
env override, else the plugin's signingSecret.src/pg-corpus.test.ts, runs when HULO_PG_URL
is set): every raw SQL statement in src/ is translated by the dialect
adapter and executed against PostgreSQL 17 with TypeORM-quoted stand-ins.TrackingEmailSender
delegated to NodemailerEmailSender, which discards nodemailer's result,
so rows for order confirmations, OTPs and password resets never had a
smtpMessageId/smtpResponse. A CapturingSender subclass keeps the
result per send; the row now gets the Message-ID (stored without angle
brackets, also for sendTracked) and the SMTP reply, and its status is
set from the reply code like sendTracked does.email_log in batches of 5 000 (oldest id first, short pause
between batches) instead of one unbounded statement, applies maxRows
the same way, and prunes email_link rows past expiresAt or older
than days.dist.Reliability and security pass — no new features. Three indexes on
email_log and one on smtpMessageId are declared (run your migrations).
datetime, which
TypeORM rejects on Postgres at start-up; they are now portable Date
columns. Raw SQL quotes every camelCase column and uses SUM(CASE …)
instead of SUM(boolean), so the log, summaries, exports and the
GraphQL list work on Postgres.huloEmailLogs selected a lastClickedAt column that does
not exist and failed on every database.publicBaseUrl, trackedHosts,
clickRedirectAllowedDomains); signed links are unchanged. Bare ids
must be plain decimals (a 64-hex link token no longer resolves to row 7).allowUnauthenticatedBounceWebhook: true; it is rate limited;
Message-IDs match with or without angle brackets; soft/transient
bounces (bounceType: 'soft') are recorded as deferred and never
suppress the address; suppression inserts are race-safe.UPDATE … + 1 statements
(concurrent pixel fetches from Gmail's proxy and Apple MPP used to lose
increments); the pixel is no longer display:none (Outlook skips hidden
images) and no longer carries a same-origin resource policy.href contains & are decoded before being wrapped,
so click-through query strings survive.=, +, -, @ are quoted
so they cannot run as spreadsheet formulas; suppression reasons are
checked against the known set.@, the restart poll is cancelled on destroy.retention defaults to { days: 365 } (was: keep everything).trustedIpHeaders (proxy headers that may override
req.ip; default none) and allowUnauthenticatedBounceWebhook.id DESC (same order, uses the primary key).hulo-global-logo.svg is now the HG wordmark on the HULO black rounded square (the same mark as the huloglobal.com header), with explicit -light and -dark variants alongside the auto-switching default..env edit, no restart. Renewed subscription keys are picked up automatically too. New admin endpoints licence/purchase-link and licence/claim-status.@huloglobal/vendure-licence-sdk ^0.12.0.dbConnectionOptions use.
Verified against PostgreSQL 17. MySQL/MariaDB installs are unaffected
(byte-identical passthrough).customerId lookup in TrackingEmailSender. If
the subject doesn't contain an order code (password reset, OTP,
email verification, account welcome, etc.) the sender now does a
case-insensitive Customer.emailAddress lookup so the row still
links to the right customer. Combined with 0.8.1's order-code
extraction, this means the per-customer Emails view now surfaces
every send the customer ever received — order-related and
non-order-related.TrackingEmailSender now populates orderCode, orderId and
customerId on every EmailLog row it creates. Before this fix, only
emails sent by our own service code (which passed those ids in
explicitly) had them set — the Vendure email-plugin's built-in
order-confirmation, invoice, password-reset etc. handlers do not
hand order/customer entities through to the sender, so those rows
saved with all three ids as NULL. That broke the per-order and
per-customer Emails buttons on the admin (they filter by
orderCode / customerId), showing an empty list even though the
emails were sent.
The sender now extracts the order code from the email subject via a
#<code> regex (Vendure's default order-related templates render
it there — e.g. "Order confirmation for #S2BZ54TEK91HUUBA"), then
looks up the corresponding Order row to backfill orderId and
customerId. Best-effort: unmatched subjects fall back to the
previous behaviour (envelope-only row).
warnIfIncompatibleVendure(). Logs a non-fatal warning when the runtime
@vendure/core version is outside the tested range. Silent when inside;
fail-open on unparseable versions.@vendure/core tightened to >=3.5.0 <4.0.0 — Vendure 3.5,
3.6 and 3.7 are all covered. Anything under 3.5 has never been tested
by us; anything from 4.0 upwards is deferred until we've seen the
changelog.@huloglobal/vendure-licence-sdk@^0.6.0.EmailLink entity — per-link metadata for tracked transactional
emails. Each clickable link in each email gets its own random 32-byte
token. Records the link's type, human label, visible text, position
index, template section (main_cta, footer, etc.), destination host,
path, and a SHA-256 hash of the full destination URL.EmailLinkService — issues per-link tokens, verifies HMAC
signatures on click, looks up link metadata at redirect time. Graceful
degradation: if the host doesn't have the migration yet, the redirect
still works via signature verification alone; the click event just
won't carry server-side link metadata.isSensitive: true on password-reset,
invoice-access, or licence-delivery URLs. The raw destination never
lands on an admin-visible event row; only the redacted form and hash.@huloglobal/vendure-licence-sdk@^0.5.0 for the shared
classifyEmailEvent() classifier.huloEmailLogs, huloEmailLog, huloEmailStatsByTemplate (paid),
huloEmailSuppressions, huloAddEmailSuppression,
huloRemoveEmailSuppression.npm view --json <pkg> dist.attestations.display: block on mobile tables that broke
the row / cell alignment. Table now scrolls horizontally inside its
card at narrow widths.signingSecret is configured, the URLs
embed an HMAC tag and forged ids are rejected.clickRedirectAllowedDomains).POST /email-track/bounce webhook
(bounceWebhookSecret).hashIpsInHistory, default
true; ipSalt setting)./open + /click.options.retention.@huloglobal/vendure-licence-sdk@^0.2.0.UpdateChecker integration via the licence-sdk — /email-track/status
endpoint returns version + update info, admin UI shows a banner when
a new version is available.EmailSuppression entity. Hard bounces
and complaints auto-add to the table; sendTracked() refuses
recipients on the list and writes status='suppressed'. CRUD
endpoints (GET /email-track/suppression,
POST /email-track/suppression,
DELETE /email-track/suppression/:recipient).GET /email-track/log/stats/by-template
returns open rate, click rate and click-to-open per email type.GET /email-track/log/export.csv mirrors the list
endpoint's filters (max 50 000 rows).opensJson) alongside the existing click
history. Capped to the last 50 opens per email — older opens still
contribute to openCount. Surfaced as opens: [] on
GET /email-track/log/:id.EmailTrackingPlugin — wraps @vendure/email-plugin and persists every
send to the email_log table.TrackingEmailSender — drop-in EmailSender replacement that wraps
the default Nodemailer sender and injects an open-tracking pixel and a
click redirector into the outgoing HTML.EmailTrackingService — exposed for custom controllers that send
transactional email outside the email-plugin pipeline./email-track/open/:id.gif (1×1 pixel),
/email-track/click/:id?u=<encoded> (302 redirect), and
/email-track/bounce (webhook hook for DSN parsers)./email-track/log (paginated list with filters),
/email-track/log/summary and /email-track/log/:id.@huloglobal/vendure-licence-sdk with
revocation polling against the HULO licence server.