Connection to the SMTP server
The following properties control the connection to the SMTP server:
host
: required SMTP host nameport
: optional SMTP port override. If not specified, the defaults are:plain SMTP: 25
TLS: 587
SSL: 465
encryption
:blank: none (plain SMTP)
tls
: use TLSssl
: use SSL
username
: SMTP username (required if TLS or SSL is used, optional otherwise)credentials
: SMTP password
Email addresses properties
from
:sender email address(es) appearing in the email sent
reply-to
:SINCE Orbeon Forms 2020.1
message
Reply-To
address(es)
to
:recipient email address(es) of the email sent
cc
:SINCE Orbeon Forms 2017.1
carbon copy recipient email address(es) of the email sent
bcc
:SINCE Orbeon Forms 2017.1
blind carbon copy email address(es) of the email sent
List of emails are space- or comma- separated.
Format of email addresses
In the examples above, only raw email addresses are shown. Multiple addresses must be separated by commas.
[SINCE Orbeon Forms 2021.4]
The configuration properties can now contain a name, following the standard syntax:
Or:
Keep in mind that if the addresses are stored in an XML attribute in your properties-local.xml
, you need to escape some characters:
Similarly, if you use quotes, you need to escape them:
When more than one email is present, if you specify names, you must use commas exclusively as a separator (with whitespace allowed around commas):
Attachment properties
attach-pdf
: whether the PDF representation is attached to the emailattach-tiff
: whether the TIFF representation is attached to the emailattach-xml
: whether the XML data is attached to the email
[SINCE Orbeon Forms 2016.1]
The following property controls whether file and image form attachments are attached to the email.
all
: all form attachments are included (this is the default)none
: no form attachments is includedselected
: only form attachments selected in the Form Builder with "Include as Email Attachment" are included
[SINCE Orbeon Forms 2018.1]
The following properties control the name of the PDF, TIFF and XML attachments:
oxf.fr.email.pdf.filename
:filename of the PDF attachment, when present
oxf.fr.email.tiff.filename
filename of the TIFF attachment, when present
oxf.fr.email.xml.filename
filename of the XML attachment, when present
The property contains an XPath expression which generates the filename. The expression runs in the context of the current form data but does not have a access to controls. Only a limited set of Form Runner XPath functions can be used, in particular:
fr:form-title()
fr:app-name()
fr:form-name()
fr:form-version()
fr:document-id()
fr:mode()
fr:is-readonly-mode()
fr:is-design-time()
NOTE: Control values must be extracted by searching for element values within the XML document. In the future, we hope to provide a function for that purpose.
Email subject and body
NOTE: Since Orbeon Forms 2018.1, you can set a form's email subject and body in the Form Builder user interface. You can also use template placeholders. See Email settings.
With any Orbeon Forms version, the following properties can be used to set default and per app/form email subject and body templates.
Styling HTML emails
[SINCE Orbeon Forms 2019.1]
When using HTML for an email body template in Email settings, you can provide inline CSS that will be included in the email messages. For example"
This is known to work with Gmail at least.
See also
Configuration properties
Last updated