{% capture email_title %}Your order has been canceled{% endcapture %} {% capture email_body %} Order {{ name }} was canceled {% case cancel_reason %} {% when 'customer' %} at your request {% when 'inventory' %} because we did not have enough stock to fulfill your order {% when 'fraud' %} because we suspect it is fraudulent {% when 'other' %} due to unforeseen circumstances {% endcase %} {% if financial_status == 'voided' %} and your payment has been voided. {% elsif financial_status == 'refunded' %} and your payment has been refunded. {% endif %} {% endcapture %} {{ email_title }}