Child pages
  • How to style the email messages you send with ConfiForms

This is the documentation for ConfiForms Server/Data Center app

However, this might also work for ConfiForms cloud and in most cases it does. But please see this page to understand the differences between server and cloud versions of the ConfiForms app.

With ConfiForms you can easily send out email messages. Messages can be sent conditionally, and recipients can be looked up dynamically as well as the message contents.

However, by default, ConfiForms does not include any extra styles for the messages you configure and the message is sent with a default style for the HTML

Adding standard Confluence styles be done by including the CSS from Atlassian CDN right in the message body (of course, you can add your own CSS rules if/when necessary to be included in the result message)

Here is a visual example

<ac:structured-macro ac:macro-id="8b413be5-0cc2-4079-b7fa-b1d978c368d9" ac:name="confiform" ac:schema-version="1">
  <ac:parameter ac:name="formName">myform</ac:parameter>
  <ac:rich-text-body>
    <ac:structured-macro ac:macro-id="8a4fd870-6a1d-4a7c-9536-b52e1ad2f337" ac:name="confiform-entry-register" ac:schema-version="1">
      <ac:parameter ac:name="formName">myform</ac:parameter>
      <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
      <ac:rich-text-body>
        <p>
          <br/>
        </p>
      </ac:rich-text-body>
    </ac:structured-macro>
    <p>
      <ac:structured-macro ac:macro-id="2c29ead4-2191-4db2-a55c-9bf2965bd5aa" ac:name="confiform-field-definition" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">what</ac:parameter>
        <ac:parameter ac:name="fieldLabel">what</ac:parameter>
        <ac:parameter ac:name="type">text</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>
      <ac:structured-macro ac:macro-id="c396afcd-7b9d-45c3-9c1e-009b21f75caf" ac:name="confiform-field-definition" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">when</ac:parameter>
        <ac:parameter ac:name="fieldLabel">When</ac:parameter>
        <ac:parameter ac:name="type">datetime</ac:parameter>
      </ac:structured-macro>
    </p>
    <ac:structured-macro ac:macro-id="54fe66b9-44a0-485f-b958-654b350904a4" ac:name="confiform-ifttt" ac:schema-version="1">
      <ac:parameter ac:name="action">Send Email</ac:parameter>
      <ac:parameter ac:name="event">onCreated</ac:parameter>
      <ac:parameter ac:name="title">Email from ConfiForms</ac:parameter>
      <ac:parameter ac:name="who">alex@vertuna.com</ac:parameter>
      <ac:rich-text-body>
        <ac:structured-macro ac:macro-id="778dbd46-9ef7-4ddf-8703-ffb7cc93ce82" ac:name="html" ac:schema-version="1">
          <ac:plain-text-body><![CDATA[<link rel="stylesheet" href="//aui-cdn.atlassian.com/aui-adg/6.0.9/css/aui.min.css" media="all">

<!-- AUI Experimental components -->
<link rel="stylesheet" href="//aui-cdn.atlassian.com/aui-adg/6.0.9/css/aui-experimental.min.css" media="all">]]></ac:plain-text-body>
        </ac:structured-macro>
        <p>
          <br/>
        </p>
        <p>This is an email from <strong>ConfiForms</strong>
        </p>
        <ac:structured-macro ac:macro-id="1889f4fe-628a-4c8d-b692-682dbbd54b97" ac:name="confiform-card" ac:schema-version="1">
          <ac:parameter ac:name="filter">id:[entry.id]</ac:parameter>
          <ac:parameter ac:name="formName">myform</ac:parameter>
          <ac:rich-text-body>
            <p>
              <ac:structured-macro ac:macro-id="9e406849-b18c-4661-ac82-6228a55a0442" ac:name="confiform-field" ac:schema-version="1">
                <ac:parameter ac:name="fieldName">what</ac:parameter>
              </ac:structured-macro>
            </p>
            <p>
              <ac:structured-macro ac:macro-id="990048d4-1163-490c-b05d-390d9e52f1f3" ac:name="confiform-field" ac:schema-version="1">
                <ac:parameter ac:name="fieldName">when</ac:parameter>
              </ac:structured-macro>
            </p>
          </ac:rich-text-body>
        </ac:structured-macro>
        <p>Thank you, Vertuna team</p>
      </ac:rich-text-body>
    </ac:structured-macro>
  </ac:rich-text-body>
</ac:structured-macro>
<p>
  <br/>
</p>
<p>
  <br/>
</p>


Use inline styles instead

With ConfiForms version 2.18.1 (Release Notes#Version2.18.1) you can use the following option that has better compatibility with email clients (as very few email clients really support CSS from external sources as shown in this page on the left)