This plugin is responsible for importing the documents present in a defined form from the user’s mail account. The user is allowed to configure any mail account as well as the type of documents which the plugin will support. This configuration is done per batch class. Multiple email accounts can be set up for each batch class.

File Name Length Restriction

Use the following formula to determine the maximum file name length that Ephesoft Transact supports for email import:



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

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


Mail configuration



Following are the configurable mail account properties:

Configurable property Type of value Value options Description
Username String A valid email account username. The user account name to be configured with Ephesoft on which the Email Import service will keep a watch.
Password String Corresponding password for the configured username Password for the configured user account.
Incoming name String A valid mail server name The name of the mail server to which the configured user account belongs.
Type Drop down POP3/IMAP The type of the mail server to which the configured user account belongs.
Folder String A valid and existing mail folder name The name of the mail folder on which the Ephesoft Email import will be checking. Generally it is INBOX only.
SSL Check Box Checked
The property that defines whether we'll be connecting to mail server using the SSL settings or Non-SSL.
Port Integer A valid port number The port number on which the configured mail server type will work. If port number is not specified Ephesoft will use connect to default ports i.e. 995 for POP3 and 993 for IMAP.

Configurable Properties file

  • <Ephesoft installation directory>\ Application\WEB-INF\classes\META-INF\dcma-mail-import\mail-import. properties:
Configurable property Type of value Value options Description
dcma.importMail.cronExpression String A valid cron expressions The CRON expression defining the look up time for the plug-in, i.e. at what time the plug-in looks for any updates in the configured mail account.
dcma.supported.attachment.extension String List of valid file extensions Defines the supported documents by the plug-in. Multiple entries are separated by a ( ; ) character"
dcma.mail.import.core.size Integer Valid number of thread pool size. This property defince the thread pool size which will process mails downloaded from configured mail server.
dcma.mail.import.mail_body_extension_type Integer 0 = HTML
1 = TEXT
Default value: 0 (HTML)
This property defines the extension type for file created for downloaded mail body.
dcma.mail.import.max_mail_retry_count Integer Valid number retry count.
Default value: 3
This property defines number of times a mail need to be tried before it is marked as read and stops its further processing.
dcma.mail.import.mail_retry_interval Integer Valid time lag in milli second
Default value:
The property specifies the time lag between consecutive mails retries.
dcma.mail.import.mail_body_download_flag Integer 1= don't download body
download only attachments
0= download body with
attachments(default value)
This property tells whether to download mail body or not.
dcma.importMail.mailProcessCronExpression String A valid cron expression
Default value is 5min
This expression decide after how much time interval a batch needs to picked from imported mails.
dcma.mail.import.max_mail_processing_capacity Interger A valid number of mails those need to be clubbed in one batch
Default value is 5 mails
This Integer values tell the maximum number of mail those needs to be clubbed in one batch.
dcma.mail.import.mail_pickup_procedure Integer 0= Simple pickup(Default)
1= Clubbing of mail in 1 batch.
This property decides when mail need to clubbed in on batch and when simple 1 batch/mail need to be created


  • <Ephesoft installation directory>\ Application\WEB-INF\classes\META-INF\dcma-open-office \open-office.properties:
Configurable property Type of value Value options Description
openoffice.serverUrl String ServerName where open office will run. This property provide server name for open office service. Generally it is server name where Ephesoft is running, so that we can start open office on same server.
openoffice.serverPort Integer A valid and available port number. Port number used for connecting to the open office server instance. Default port is 8100
openoffice.autoStart Boolean True
If the open office server should be started / connected upon XE starts. Default value is false.
openoffice.homePath String N-A Path to open office installation. "If no path is provided a default value will be calculated based on the operating environment."


  • The functionality/service allows the user to set up any number of mail accounts for gathering data.
  • The user is allowed to configure the account via UI.
  • The functionality/service can support multiple document formats (zip, doc, xls, tif).
  • The functionality/service makes use of the open-office to convert the received attachments files into application usable formats i.e. pdf.
  • The functionality/service is capable of downloading and saving the attachments of a mail.
  • The functionality allows user to choose whether to download mail body or just need to process the mail attachments.
  • This functionality provides an option to club multiple emails into one batch.
  • When a batch need to be created in Mail clubbing feature depends on two properties.
    • dcma.mail.import.max_mail_processing_capacity
    • dcma.importMail.mailProcessCronExpression

A batch creation can be triggered by either cron job or when number of mails downloaded equals the number specified by dcma.mail.import.max_mail_processing_capacity property.

Steps of execution/working

  • When the plug-in properties have been set up properly, Ephesoft moves ahead with mail downloading by accessing the mail account.
  • Email import service reads the user’s mail configuration from the database, and tries to access the user’s mail account using the configured settings.
  • If the service is able to connect to the user account, it reads all the unread mails contained in the configured folder.
  • After the service has read the mails, it starts processing multiple mails at a time.
  • Each read mail goes through a three step procedure of processing, downloading, converting and creating a batch for the mail.
  • If any error occurs while processing a mail, the mail is given configured number of tries, if even after multiple tries the mail was not able to get processed the mail is marked and read and the service sends notification mail to mail accounts configured for notification.
  • After a mail body and its attachments are download and converted into pdfs, they are further copied to UNC folder of corresponding batch classes. Copying to UNC folder is controlled by mail clubbing feature. In case mail clubbing is disabled one batch per mail will be created and copied to UNC and when mail clubbing is enabled a singled batch is created for multiple number of mails.


The following table lists a few common error messages that may occur if the plugin malfunctions:

S. No. Error message Possible root cause
1 Unable to convert Email into PDF file. Open office service is either not running or have not been configured correctly
2 Not able to establish connection. Connection could not be established for the current user's account configuration.
3 Could not find port number. Trying with default value of 995. Port number specified in the user's configuration is invalid, hence plug-in tries to connect on the default pop3 port.
4 Could not find port number. "Trying with default value of 993. Port number specified in the user's configuration is invalid hence plug-in tries to connect on the default imap port."
5 Error while reading mail contents Either email body or other attachments could not be read and converted
6 Not able to process the mail reading. Some error in reading the contents of mail. Open-office could not convert the source file into desired.

Was this article helpful to you?