1

I have a contact form that works using Postmark and Contact Form plugin.

I'm trying to find a way to edit the format of the email that I'm getting when someone sends a message via the website contact form. E.g.

Subject: 
Message from: {{ name.field }}

Full name:
{{ name.field }}

Email:
{{ email.field }}

Department:
{{ department.field }}

Message:
{{ message.field }}

I can see that there's a "HTML Email Template" option in Settings > Email. But I couldn't find any documentation.

Matt Stein
  • 4,006
  • 3
  • 26
  • 57
DorinV
  • 125
  • 1
  • 3
  • Is this post any help? http://craftcms.stackexchange.com/questions/2232/pt-contact-form-plugin-html-email-templates or possibly, although unlikely, this http://craftcms.stackexchange.com/questions/1582/pass-content-of-system-messages-to-html-email-template You could also go the plugin route https://sprout.barrelstrengthdesign.com/craft-plugins/email – Mark Busnelli Jr Nov 21 '16 at 15:19
  • No, unfortunately none of them help. Sprout: I wouldn't want to pay $99 just to have an email template ... – DorinV Nov 21 '16 at 16:05

1 Answers1

0

The "HTML Email Template" option in Settings > Email in the Craft control panel is completely unrelated to the Contact Form plugin.

If you want to change the body of the email that gets sent out, you'll need to write a plugin that listens to the beforeMessageCompile event as documented here: https://github.com/pixelandtonic/ContactForm#the-contactformbeforemessagecompile-event

Brad Bell
  • 67,440
  • 6
  • 73
  • 143
  • 1
    Thank you. I can understand that's the solution but as a front-end dev it's very difficult to understand how that works. I wonder why didn't they just include the {fromName} and {fromEmail} and {subject} as part of the body email by default ... – DorinV Nov 24 '16 at 13:38