Magento – Send personalized email (different template) on customer registration on magento2

customeremail-templatesmagento2

Is there a way to send a different email template on customer's registration based on some params (for example the customer gender)?

For example: A male customer receive an email (defined in Maketing->email templates) with the id 11, and a female customer on registration receive the email with the id 12.

I have to overwrite all the customer module?

Best Answer

Customize Email Template, Transactional Email:

  • Step 1: Load the Default Template
  • Step 2: Fill out the Template Information
  • Step 3: Preview the Template
  • Step 4: Apply the new Template

Step 1: Load the Default Template

  • On the Admin Panel, Marketing > Communications > Email Templates.
  • Click on Add New Template,Choose the types of the Template: Header, Footer, or Message Templates.
  • Click on Load Template, the corresponding format will appear.

enter image description here

Step 2: Fill out the Template Information

  • Name for the new template in the Template Name field.
  • Insert the Template Subject for the organization of the templates. The list of templates can be sorted and filtered by the Subject column.

enter image description here

  • Customize the HTML as you need in the Template Content box.
  • Click on Insert Variable to insert a variable in the Template Content box.

enter image description here

With the inserted variable, you can custom it directly into the template.

  • If you want to declare any CSS, enter the styles in the Template Styles box.

Step 3: Preview the Template

  • To ensure that the template is applied correctly as you expect, click on Preview Template to adjust if need.

  • Save Template to complete.

Each completed new template is auto-updated in the list of available Email templates.

Step 4: Apply the new Template

Footer/ Header Template

  • Go to Magento Admin, follow the path: Store > Configuration > Customers > Customer Configuration

Basing on where the template is placed to open the relevant option. For example, the template belongs to Create New Account Options:enter image description here

  • Set the new template for Welcome Email.

  • Save Config to complete

Refrence

Hope This will help :)