1

In continue with

Magento 2: How to change Contact Us Email Type?

I have set my new template for Contact Us.

{{template config_path="design/email/header_template"}}

<table>
    <tr>
        <td>{{trans "Name: %name" name=$data.name}}</td>
    </tr>
    <tr>
        <td>{{trans "Email: %email" email=$data.email}}</td>
    </tr>
    <tr>
        <td>{{trans "Phone Number: %telephone" telephone=$data.telephone}}</td>
    </tr>
    <tr>
        <td>{{trans "Comment: %comment" comment=$data.comment}}</td>
    </tr>
</table>

{{template config_path="design/email/footer_template"}}

When i "Preview Template" from Admin, then it's showing Header & Footer.

In the Email it's not showing. I already cleared cache & run all commands.

  • Make sure type of your template should be html in your email_template.xml – mp196 Jan 4 '17 at 9:28
  • Yes its already html. In email i got as mentioned in question. Only header & footer missing – Ankit Shah Jan 4 '17 at 9:30
  • The content showed correctly? – Khoa TruongDinh Jan 4 '17 at 9:31
  • Then you should probably check the email template selected in backend for the contact us. – mp196 Jan 4 '17 at 9:31
  • Yes @KhoaTruongDinh Content show perfect in HTML mode. For other email templates i'm using same header & footer & it works. – Ankit Shah Jan 4 '17 at 9:32
2
<!--@vars {
"template config_path=\"design\/email\/footer_template\"":"Email Footer Template",
"template config_path=\"design\/email\/header_template\"":"Email Header Template"
} @-->

This will solve issue

  • are you added in custom template in magento backend right? – Ajay Patel Jun 22 '17 at 4:22
  • Yes. This should be in ur template .html file – Ankit Shah Jun 22 '17 at 4:38
  • can you help me find the template path – Ajay Patel Jun 22 '17 at 5:28
  • i have added in submitted_form.html but not working – Ajay Patel Jun 22 '17 at 6:14
  • Please create new question & post your code with that @AjayPatel – Ankit Shah Jun 22 '17 at 6:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.