was successfully added to your cart.

How to Configure Email Templates in Magento 2

How to configure email templates

Communicating with your customers is essential to smooth working of your online business. You need to notify them about things like order placement, order dispatch, promotions, invoices etc. People trust a business which keeps them updated and you get repeat customers.

When a customer places an order with you, it is an event that triggers many actions that follow. One of them is to notify your customer about the details of the order and payment confirmation. You also provide a timeline for the shipment and try to up-sell and cross-sell through email messages.

You can configure email templates in Magento 2 to automatically send emails to your customers when a transactional event occurs. In this tutorial, we’ll guide you through the process of setting up email templates in Magento 2.

Step 1: Go to Marketing => Email Templates (under Communications):

Email-Templates-Submenu-1024x509

If this is your first time configuring an email template, you’ll see that the list in the Email Templates page is empty.

Add-New-Template-1024x388

Step 2: Click on the Add New Template button to add a new template.

Step 3: Fill in the New Template Form.

New-Template-Form-1024x507

There are two sections in the New Template form:

  • Load default template: You need to select an event from the drop-down list for which you want to configure an email autoresponder. Below are the different events for which Magento 2 provides default templates:
    • Magento_Checkout: For check out related events –
      • Payment Failed
    • Magento_Contact
      • Contact Form
    • Magento_Customer: For customer account related events –
      • Change Email
      • Change Email and Password
      • Forgot Password
      • New Account
      • New Account (Magento/luma)
      • New Account Confirmation Key
      • New Account Confirmed
      • New Account Without Password
      • Remind Password
      • Reset Password
    • Magento_Directory
      • Currency_Update Warnings
    • Magento_Email
      • Footer
      • Footer (Magento/luma)
      • Header
    • Magento_Newsletter: When someone subscribes to and unsubscribes from your newsletter –
      • Subscription Confirmation
      • Subscription Success
      • Unsubscription Success
    • Magento_ProductAlert: For price and stock alerts –
      • Cron Error Warning
      • Price Alert
      • Stock Alert
    • Magento_Sales: Transactional events related to an order –
      • Credit Memo Update – with the option to set Credit Memo Update template for Guest.
      • Invoice Update – with the option to set Invoice Update template for Guest.
      • New Credit Memo – with the option to set New Credit Memo template for Guest.
      • New Invoice – with the option to set New Invoice template for Guest.
      • New Order – with the option to set New Order template for Guest.
      • New Shipment – with the option to set New Shipment template for Guest.
      • Order Update – with the option to set Order Update template for Guest.
      • Shipment Update – with the option to set Shipment Update template for Guest.
    • Magento_SendFriend
      • Send Product Link to Friend
    • Magento_SiteMap
      • Sitemap Generation Warnings
    • Magento_User
      • Forgot Admin Password
      • User Notification
    • Magento_Wishlist
      • Wish List Sharing

   Once you’ve selected a template, click on Load Template button.

   Load-a-template-1024x902

  • Template Information: When you click on the Load Template button, forms in the Template Information section get filled by the template content automatically –
    • Currently Used For: This is the default config for which the template will be used. In our example, the new email template will be used for sending the Default Welcome Email for a new account.
    • Template Name: Set a descriptive name for your new email template here.
    • Template Subject: This is the subject of your email. Set it to relay relevant information about the body.
    • Template Content: Set the content of your email body here. You can insert variables like customer name and address, account URL, store name and address etc., by clicking on the Insert Variable button.

Insert-Variable-1024x470

    • Template Styles: Add custom layout style here to design your email template.

Step 4: Once you’re done filling the New Template form, you can preview how the email will look like by clicking on the Preview Template button.

Preview-Email-1024x509

Step 5: Click on the Save Template button to save the new email template.

Quick Tip: Some email accounts are set to not show emails built with HTML. You may want your email to be in plain-text to be visible to all your recipients. Click on the Convert to Plain Text button to remove all HTML tags from the email.

This concludes our tutorial on how to configure email templates in Magento 2.

Editorial Staff

About Editorial Staff

We are a team of Magento ecommerce developers and SEO experts at Humcommerce. We write about anything and everything which can help you run your Magento 2 ecommerce store better.