Mail Form Data Behavior - Bloomreach Experience - Open Source CMS

This article covers a Hippo CMS version 10. There's an updated version available that covers our most recent release.


Mail Form Data Behavior

  • HST Behavior class: com.onehippo.cms7.eforms.hst.behaviors.MailFormDataBehavior
  • CMS Plugin class: com.onehippo.cms7.eforms.cms.extensions.MailFormDataPlugin


The Mail Form Data pluggable behavior sends submitted form data to a configurable e-mail address.




From Enterprise Forms v1.03.03, the behaviour allows you to compose notification email content:

  • Subject: the desired notification email subject
  • Mail text: a paragraph to be inserted into mail body. The specific paragraph position depends on the mail template.
  • Backend mail template: You can choose one of supported template engines to compose email content. If the template field is empty, the default template will be used to generate notification email content.

CMS Configuration

To add the CMS plugin to the form editor, add a node of type frontend:plugin under /hippo:namespaces/eforms/form/editor:templates/_default_. You may choose your own name for this node.

Add the following properties:

  • plugin.class = com.onehippo.cms7.eforms.cms.extensions.MailFormDataPlugin
  • mode = ${mode}
  • = ${}.extensions.item
  • wicket.model = ${wicket.model}



Note: instead of adding the plugin to the default eforms:form template, you can also define your own custom form template and add the plugin there.

HST Configuration

To add the behavior to your form component, add at least the following parameter to the component configuration:

  • behaviors = com.onehippo.cms7.eforms.hst.behaviors.MailFormDataBehavior
  • eforms-mailsession = mail/Session (depends on your environment)

You can also provide the following optional component parameters (if not provided, your mail server will use default values):

  • eforms-from-email
  • eforms-from-name
  • eforms-subject


Template engines

Enterprise Forms supports Freemarker and Velocity engines to generate email content. A component can choose the active engine with the component parameter eforms-use-freemarker:

  • false (default): use Velocity template engine.
  • true: use Freemarker template engine.


The Enterprise Forms demo contains a form using the mail form data behavior:

Did you find this page helpful?
How could this documentation serve you better?
On this page
    Did you find this page helpful?
    How could this documentation serve you better?