public interface EmailResource
EmailResource
interface represents a single email message to be sent using one of the sendmail()
methods.
Modifier and Type | Method and Description |
---|---|
boolean |
sendmail()
Sends the email message as specified in the email resource.
|
boolean |
sendmail(java.lang.String[] attachmentFilePaths)
Sends the email message as specified in the email resource together with any attachments.
|
boolean |
sendmail(java.lang.String[] attachmentFilePaths,
java.util.Map<java.lang.String,java.lang.String> attachmentTexts)
Sends the email message as specified in the email resource together with any attachments.
|
boolean sendmail() throws com.ebasetech.xi.exceptions.FormRuntimeException
If a failure occurs, behaviour depends on the setting of the Success of this Email is critical checkbox in the email resource:
com.ebasetech.xi.exceptions.FormRuntimeException
- if any error occurs during execution and the email resource is marked as critical (see above)sendmail(String[])
,
sendmail(String[], Map)
boolean sendmail(java.lang.String[] attachmentFilePaths) throws com.ebasetech.xi.exceptions.FormRuntimeException
If a failure occurs, behaviour depends on the setting of the Success of this Email is critical checkbox in the email resource:
attachmentFilePaths
is an array that specifies a number of file paths for files
to be attached to the email.
Javascript example:
var fileAttachments = [ fields.FILE1.value, fields.FILE2.value ]; var emailOk = resources.EM1.sendmail(fileAttachments); if (!emailOk) ....
attachmentFilePaths
- an array of file paths for files to be attached to the emailcom.ebasetech.xi.exceptions.FormRuntimeException
- if any error occurs during execution and the email resource is marked as critical (see above)sendmail()
,
sendmail(String[], Map)
boolean sendmail(java.lang.String[] attachmentFilePaths, java.util.Map<java.lang.String,java.lang.String> attachmentTexts) throws com.ebasetech.xi.exceptions.FormRuntimeException
If a failure occurs, behaviour depends on the setting of the Success of this Email is critical checkbox in the email resource:
attachmentFilePaths
is an array that specifies a number of file paths for files
to be attached to the email.attachmentTexts
is a Map that provides a way of specifying attachments using strings.
Map keys are treated as attachment names and the corresponding values form the attachments.Javascript example 1 (inline attachment):
var inlineAttachments = {}; inlineAttachments.attachment1Name = "This is an email attachment"; resources.EM1.sendmail(null, inlineAttachments);
Javascript example 2 (inline and file attachments):
var inlineAttachments = {}; inlineAttachments.attachment1Name = "This is an email attachment"; var fileAttachments = [ fields.FILE1.value, fields.FILE2.value ]; resources.EM1.sendmail(fileAttachments, inlineAttachments);
attachmentFilePaths
- an array of file paths for files to be attached to the emailattachmentTexts
- a Map specifying inline (String) attachments, see abovecom.ebasetech.xi.exceptions.FormRuntimeException
- if any error occurs during execution and the email resource is marked as critical (see above)sendmail()
,
sendmail(String[])