icon Forms Renderer
Created by Orckestra

Email Notifications

Be notified on each user's input

You can configure the form to send email notifications with the user's input data each time the user submits the form.

Make sure to configure the email host (please see "Email Host Setup").

How to set up email notifications

  1. Open the Composite.Forms.Renderer function's properties.
  2. For its Email parameter, select the Composite.Forms.FormEmailfunction and specify its parameters:
    • From: The sender's email address (required).
    • To: The recepient's email address (required).
    • Cc: The email address to send the copies of notifications to (optional).
    • Subject: The email message's subject (required).
    • Body: Content to add to the email message's body
    • AppendFormData: If 'True' (default), the submitted form's data will be added to the email message's body.

For sending email notifications to two recipients:

  1. Open the Composite.Forms.Renderer function's properties.
  2. For its Email parameter, select the Composite.Forms.JoinEmails function.
  3. For Email A and Email B parameters, select the Composite.Forms.FormEmail function and specify its parameters as described above.

Using an email address from the datatype field

If you want to use a field value from your datatype as a recipient's email address in the To field:

  1. Use or edit the Composite.Forms.FormEmail function.
  2. For its To parameter, select the Composite.Forms.FormRendererParameter function.
  3. In its Property Name parameter, specify the name of the field in your datatype, which you want to use for the recipient's email address. 

If you need to send an email to 2 recipients and use a field from your datatype as a recipient To field for the 2nd recipient:

  1. Use or edit the Composite.Forms.JoinEmails function.
  2. For its Email A and Email B parameter, select the function Composite.Forms.FormEmail and specify its parameters as described above.
  3. In the To parameter of the Composite.Forms.FormEmail function for the Email B parameter, select the Composite.Forms.FormRendererParameter function.
  4. In its Property Name parameter, specify the name of the field from your datatype, which you want to use for the recipient's email address.

Important Notes

  1. If the From and To fields do not contain valid email adresses, the email notification will not be sent.
  2. If the Cc field has an invalid email address, the email notification will still be sent to the recipient specified in the To field (only failing to be sent to the Cc's recipients.)
  3. If email adresses are invalid, you will see error in the Logger similar to: "Error : Mail sending (From: 'yourrecipient') : The specified string is not in the form required for an e-mail address."
  4. The e-mail functionality of this function will use an SMTP Server on the local host (server) by default. You can cange this behavior by editing ~/web.config and include the /configuration/system.net/mailSettings section. Read more about configuring the e-mail host in web.config.

Customization

You can customize the email message's body by editing the following XSLT file:

~/Frontend/Composite/Forms/Renderer/Xslt/MailBody.xslt

Back to top