Create an email template ​

An email template stores a standard subject and message, for example the email that goes with every quotation. When you send an email from a document, you select the template, and ERPNext fills in the subject and message.

Create the template ​

  1. Open the Email Template list, and select New.
  2. Enter a name for the template.
  3. Enter the Subject.
  4. Enter the message in Response.
  5. Select Save.

To write the message in HTML, select Use HTML. The text editor changes to a code editor. Use HTML when you need full control of the layout, or Jinja loops.

Insert document fields ​

The template can use the fields of the document that you email. ERPNext renders the template with Jinja. Write a field name in double braces. For a Sales Order:

jinja
Dear {{ customer_name }},

Thank you for your order {{ name }} of {{ grand_total }}.
We will deliver it by {{ delivery_date }}.

To find the field names of a document, open Customize Form, select the DocType, and read the Name column of the fields table.

Use the template ​