Skip to content

Commit 56fa817

Browse files
Change the default contact form email template to HTML
1 parent 83e7b3b commit 56fa817

File tree

3 files changed

+25
-20
lines changed

3 files changed

+25
-20
lines changed

app/code/Magento/Contact/etc/email_templates.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Email:etc/email_templates.xsd">
9-
<template id="contact_email_email_template" label="Contact Form" file="submitted_form.html" type="text" module="Magento_Contact" area="adminhtml"/>
9+
<template id="contact_email_email_template" label="Contact Form" file="submitted_form.html" type="html" module="Magento_Contact" area="frontend"/>
1010
</config>

app/code/Magento/Contact/view/adminhtml/email/submitted_form.html

Lines changed: 0 additions & 19 deletions
This file was deleted.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!--
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
-->
7+
<!--@subject {{trans "Contact Form"}} @-->
8+
<!--@vars {
9+
"var data.comment":"Comment",
10+
"var data.email":"Sender Email",
11+
"var data.name":"Sender Name",
12+
"var data.telephone":"Sender Telephone"
13+
} @-->
14+
15+
{{template config_path="design/email/header_template"}}
16+
17+
<ul>
18+
<li>{{trans "Name: %name" name=$data.name}}</li>
19+
<li>{{trans "Email: %email" email=$data.email}}</li>
20+
<li>{{trans "Phone Number: %telephone" telephone=$data.telephone}}</li>
21+
<li>{{trans "Comment: %comment" comment=$data.comment}}</li>
22+
</ul>
23+
24+
{{template config_path="design/email/footer_template"}}

0 commit comments

Comments
 (0)