Transact

  1. Home
  2. Transact
  3. Features and Functions
  4. Administrator Role and Features
  5. Importing Documents
  6. Email Configuration
  7. Email Configuration

Email Configuration

The purpose of the Email Configuration screen is to allow users to configure their email accounts with Ephesoft Transact. This screen works with the Email Import plugin to import documents from a user’s email account. This configuration is done per batch class. Multiple email accounts can be set up for each batch class.

Prerequisites

Complete the following steps in order to turn on the email processing feature in Ephesoft Transact.

  1. Open the applicationContext.xml file, located at [Ephesoft_Directory]\Application\applicationContext.xml.
  1. Locate and uncomment the following line to allow email processing. This line is commented out by default. 
<import resource="classpath:/META-INF/applicationContext-dcma-mail-import.xml" />

Figure 1. Default Lines in applicationContext.xml File

  1. Restart Ephesoft Transact.

You have enabled the email processing feature. Continue to Configuration Steps to connect your email account with Ephesoft Transact.

Configuration Steps

Follow the steps below to configure email accounts:

  1. Go to the Batch Class Management screen.
  2. Open your batch class.
  3. Click Email Configuration to begin configuring user email accounts for Ephesoft Transact.


Figure 2.
Email Configuration Screen

  1. Use the following table as a guide to configure your email account.
Configurable Property Value Type Value Options Description
Username String Valid email account username The account name to be configured with Ephesoft Transact
Password String Corresponding password for the configured username Password for the configured user account

Note: Password will always visible as 8 * in the Password field.

Incoming Server String Valid mail server name The name of the mail server to which the configured user account belongs
Protocol or Server Type Drop-down selection Valid mail server type

  • IMAP
  • POP3
  • Exchange
  • OAuth2*
The type of mail server that the configured user account belongs to
Folder String Valid and existing mail folder name The name of the mail folder that the email import will be checking. This folder name can be “Inbox.”
Security Type Drop-down selection
  • PLAINTEXT
  • SECURED
  • STARTTLS
The property that defines the security type used to connect to a mail server.
Port Integer Valid port number The port number on which the configured mail server type will work. The port number ranges from 1 to 65535.
Client ID* String Valid client ID from Azure Active Directory The client ID used for Office365 authentication with OAuth2.

Refer to Configuring Microsoft Email Services with OAuth2 for steps to obtain the client ID.

Client Secret* String Valid client secret from Azure Active Directory The client secret used for Office365 authentication with OAuth2.

Refer to Configuring Microsoft Email Services with OAuth2 for steps to obtain the client secret.

Enable Checkbox
  • Checked
  • Unchecked
The property that defines whether the email is enabled or disabled for importing documents.

* = This is available for 2020.1.02 or above. This security type is only for the Exchange Online service offered through Office 365 or Microsoft 365 subscription plans.

  1. Click Test Email to verify if the configured user email account is valid.
  2. Once the configuration is verified, click Deploy to enable automatic email ingestion for the batch class according to the cron schedule.

You have successfully configured your email with Ephesoft Transact.

Properties File

For further email import configuration, refer to the properties files below.

  • <Ephesoft installation directory>\Application\WEB-INF\classes\META-INF\dcma-mail-import\mail-import.properties:
Configurable Property Value Type Value Options Description
dcma.importMail.cronExpression String Valid cron expression The cron expression defines the look-up time for the plugin, i.e. at what time the plugin looks for any updates in the configured mail account.
dcma.supported.attachment.extension String List of valid file extensions Defines the documents supported by the plugin.

Multiple entries are separated by a “;”.

dcma.mail.import.core.size Integer Any valid integer value Defines the thread pool size that is used by the mail import service
dcma.mail.import.mail_body_extension_type Integer 0 or 1 Extension type for the mail import body
dcma.mail.import.max_mail_retry_count Integer Any valid integer value The number of times to try and process the mail
dcma.mail.import.mail_retry_interval Integer Any valid integer value The number of intervals to try and process the mail
dcma.mail.import.mail_body_download_flag Integer 0 or 1 Determines if the email body or attachments are downloaded

The default value is 0 to download the body with attachments.

dcma.importMail.mailProcessCronExpression String Valid cron expression Defines the mail processing time
dcma.mail.import.max_mail_processing_capacity Integer Any valid integer value Determines the maximum cumulative mail processing number
dcma.mail.import.mail_pickup_procedure Integer 0 or 1 Determines if the email pickup process is automated or timed
dcma.mail.msg_download_and_process_flag Integer 0 or 1 Defines a flag to specific if the file needs to be downloaded or processed
dcma.mail.number_of_mails_downloaded_per_cron_cycle Integer Any valid integer value Defines the number of mails to be downloaded per cron cycle
dcma.mail.import.mail_conversion_tool Integer
  • 1
  • 2
  • 3
Determines how the HTML mail body processes through the following software with the corresponding value:

  • 1: soffice
  • 2: iText
  • 3: wkhtmltopdf
dcma.mail.html_to_pdf_conversion_parameter String N/A Used for wkhtml software to define page and font size and magnification
dcma.mail.itext_html_tag Boolean
  • True
  • False
Used for iText software to resolve text from being cropped during the conversion process
dcma.mail.headers_switch Boolean
  • True
  • False
Determines if mail headers are processed
dcma.mail.required_headers String List of valid headings Determines which headers are processed from the mail. The values are separated by semicolons.

Example: Subject;To;From

dcma.mail.import.max_connection_retry_count Integer Any valid integer value Defines the maximum number of retry attempts made to connect to the mail server
dcma.mail.import.connection_retry_interval Integer Any valid integer value Defines the time in between each retry attempt for the mail server connection
  • <Ephesoft installation directory>\Application\WEB-INF\classes\META-INF\dcma-open-office\open-office.properties:
Configurable Property Value Type Value Options Description
openoffice.serverUrl List of values Valid server URL This is the server used for connecting to the remote OpenOffice server instance.

This is used when connecting to an external or remote service.

openoffice.serverPort Integer Valid and available port number This port number is used for connecting to the OpenOffice server instance.

The default port number is 8100.

openoffice.autoStart Boolean
  • True
  • False
Determines if the OpenOffice server should be started or connected when XE starts

The default value is false.

openoffice.homePath String N/A This is the path to OpenOffice installation.

If a path is not provided, then a default value will be calculated based on the operating environment.

openoffice.maxTasksPerProcess Integer Any valid integer value Determines the maximum number of simultaneous conversion tasks to be handled by a single OpenOffice process.

The default value for optimized performance is 50.

openoffice.taskExecutionTimeout Integer N/A Timeout for conversion tasks (in milliseconds).

The default value for optimized performance is 30 seconds.

File Name Length Requirements

Ephesoft Transact email import supports a maximum filename and path length. Exceeding this maximum may result in an error. Use the following formula to determine the maximum file name length that Ephesoft Transact supports for email import:

The length of the UNC_FOLDER_File_Name_Path must be less than MAX_PERMISSIBLE_PATH_LENGTH_OF_WINDOWS minus the length of the PDF_PROCESSING_FOLDER minus 10.

Examples are provided below:

  • MAX_PERMISSIBLE_PATH_LENGTH_OF_WINDOWS = 259
  • Calculated PDF_PROCESSING_FOLDER length = 22

The following case study provides an example of this formula in the application:

  • During the import process, the file !!!mail.pdf is located in the following directory:
    • D:\Ephesoft\SharedFolders\TestBatch39455638711700
  • In this case, the maximum file name length is calculated to be as follows:
    • length[D:\Ephesof\SharedFolders\TestBatch39455638711700!!!mail.pdf] < 227

Troubleshooting

The following table includes common errors and possible root causes.

Error Message Possible Root Cause
Unable to convert Email into PDF file. OpenOffice service is not running or has not been configured correctly.
Not able to establish connection. Connection could not be established for your account configuration.
Could not find port number. Trying with a default value of 995. Port number specified in the configuration is invalid, so the plugin tries to connect on the default POP3 port.
Could not find port number. Trying with a default value of 993. Port number specified in the configuration is invalid, so the plugin tries to connect on the default IMAP port.
Error while reading mail contents The email body or other attachments could not be read and converted.
Not able to process the mail reading. An error in reading the contents of mail occurs. OpenOffice could not convert the source file.
File type is not supported. The file type in the email is not supported.

Open the mail-import.properties file. Add the file type to the following line:

dcma.supported.attachment.extension

Refer to the Properties Files section for more information on the configurable properties.

Was this article helpful to you? Yes No