Site emails

Receipts, welcomes, sign-in links and gift cards: edit and preview them.

This is the guide the PageHub MCP server gives an AI agent for get_style_reference({ topic: "emails" }). Names like set_theme are its tools (connect one), and the liquid topic is the HTML + Liquid reference.
  • list_site_emails first: each kind, whether it is customised, and whether it sends. get_site_email({ kind }) returns the subject, preheader, the Liquid source (emails/<kind>.liquid, or the default), the objects it can print ({{ order.total }}, {{ customer.name }}, {{ gift.code }}, {{ link.url }}) and its parts: keep the required ones (for a receipt, the order.lines loop).
  • update_site_email saves the subject, preheader and/or the full source, or reset: true. Then preview_site_email: an email with errors is not sent, the default goes out instead, and the preview is where the errors show. A saved email is live for the next customer (no publish).
  • Write email-safe markup: div, p, h1-h3, a, img with Tailwind and palette classes. No forms, buttons, video, dialogs or data-* runtime attributes (errors); hover:, focus:, dark: and group-* classes are ignored by mail clients (warnings). A link with a bg-* class is sent as a button.
  • A custom design needs a plan with custom email designs; the subject and preheader save on every plan.