1. Home
  2. Transact
  3. Features and Functions
  4. Administrator Role and Features
  5. Importing Documents
  6. E-mail Configuration
  7. Email Import Configurations

Email Import Configurations

You can configure an email account in the Batch Class to process the attachments in the mail or both, mail content and attachments. Once the mail import configurations are done, the application will automatically start fetching the emails and process as batch.

Following are the configurations required:

  1. Go to EphesoftApplication folder and open applicationContext.xml file in your local editor.
    Uncomment the following tag to activate mail import service.
    <import resource=”classpath:/META-INF/applicationContext-dcma-mail-import.xml” />
  2. Go to Ephesoft/Application/WEB-INF/Classes/META-INF/dcma-mail-import folder and open mail-import-properties file in your local editor.
    a. Schedule the time for running the cron job for mail import.
    b. Set the flag to include attachments or both, mail content (body) and attachments.
    #1= download only attachments
    #0= download body with attachments (default value)
  3. Open the Batch Class for which you want to configure mail import and click on Email Configuration from the left panel to configure the email account.
    Figure 1. Viewing Email Configuration in a Batch Class

    Following are the configurable mail account properties:

    Configurable propertyType of valueValue optionsDescription
    UsernameStringA valid email account username.The user account name to be configured with Ephesoft on which the Email Import service will keep a watch.
    PasswordStringCorresponding password for the configured usernamePassword for the configured user account. Password will always visible as 8 * in password field.
    Incoming ServerStringA valid mail server nameThe name of the mail server to which the configured user account belongs.
    Server typeDropdownA valid mail server type.

    • IMAP
    • POP3
    The type of the mail server to which the configured user account belongs. Server Type can be IMAP/POP3.
    Folder NameStringA valid and existing mail folder nameThe name of the mail folder on which the Ephesoft Email import will be checking. Folder Name cane be Inbox.
    Is SSLCheck Box
    • Checked
    • Unchecked
    The property that defines whether we’ll be connecting to mail server using the SSL settings or Non-SSL.
    EnableCheck Box
    • Checked
    • Unchecked
    The property that defines whether user email is enable or disable for importing documents.
    Port numberIntegerA valid port numberThe port number on which the configured mail server type will work. Port number will be in range of 1 to 65535.


    If any filed of Email configuration is not valid this field will be shown in red color.

    * Using a single email account across multiple batch classes or environments is not supported and may result in unexpected results.

  4. Once the email configuration is done, check the account settings for uninterrupted service.
    For example, in case you are configuring a Gmail account then check the following attributes:
    a. Go to My Account >> Sign-in & Security and Turn-on the switch “Allow less secure apps”.
    b. Go to Settings, open the tab “Forwarding and POP/IMAP” and Enable IMAP access.
    c. Save Changes.
  5. Restart the Ephesoft server and test the functionality.
    Depending upon the scheduler, the application will pick-up the emails and start processing them as Batch. You can view the batches in the Batch Instance screen. Or, go to the Shared Folder to view the processed batches.

Configurable Properties file

  1. mail-import. properties
    Path: <Ephesoft installation directory> ApplicationWEB-INFclassesMETA-INFdcma-mail-importmail-import. properties

    Configurable propertyType of valueValue optionsDescription
    dcma.importMail.cronExpressionStringA valid cron expressionsThe 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.extensionStringList of valid file extensionsDefines the supported documents by the plug-in. Multiple entries are separated by a “;”.


    Path: <Ephesoft installation directory>

    Configurable propertyType of valueValue optionsDescription
    openoffice.serverUrlList of valuesON/OFFServer used for connecting to the remote open office server instance. Used in case of connecting to external/remote service.
    openoffice.serverPortIntegerA valid and available port number.Port number used for connecting to the open office server instance. Default port is 8100


    If the open office server should be started / connected upon XE starts. Default value is false.
    openoffice.homePathStringN-APath to open office installation. If no path is provided, a default value will be calculated based on the operating environment.
    openoffice.maxTasksPerProcessIntegerAny valid integer value.Maximum number of simultaneous conversion tasks to be handled by a single open office process. Default value for optimized performance is 50.
    openoffice.taskExecutionTimeoutIntegerAny valid integer value.Timeout for conversion tasks (in milliseconds). Default value for optimized performance is 30 seconds.

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:EphesoftSharedFoldersTestBatch39455638711700,
  • In this case, the maximum file name length is calculated to be as follows:
    • length[D:EphesoftSharedFoldersTestBatch39455638711700!!!mail.pdf] < 227

Email Enable

This feature is responsible for enabling/disabling an email for importing the documents present in a defined form from the user’s mail account. A batch class can have multiple user mail accounts and multiple enable/disable user mail accounts.

Test Email

This feature is responsible to verify whether a configured user mail account is valid. User can check the connection for user’s mail account after configuration of mail account.


  • 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.
  • The functionality/service makes use of the open-office to convert the received data files into application usable formats.
  • The functionality/service is capable of downloading and saving the attachments of a mail.

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 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 processing of a mail, the service sends notification mail to mail accounts configured for notification.


Following are few common error messages received due to mal-functioning of the plugin:

S no.Error messagePossible root cause
1Unable to convert Email into PDF file.Open office service is either not running or have not been configured correctly
2Error in Server Type Configuration, only IMAP/POP3 is allowed.Plug-in only supports IMAP or POP3 server type. Check the user’s account configuration.
3Not able to establish connection.Connection could not be established for the current user’s account configuration.
4Could 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.
5Could 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.
6Error while reading mail contentsEither email body or other attachments could not be read and converted
7Not able to process the mail reading.Some error in reading the contents of mail. Open-office could not convert the source file into desired.

Email Import with Folder other than Inbox

Earlier in Email Import Configuration folder name was not editable. It was fixed to Inbox folder only. Folder is editable for IMAP Server but is fixed to Inbox for POP3 Server.


Figure 2. Editable Folder for IMAP Server

To use a sub-folder for Inbox, enter Inbox/<sub folder> as shown in the figure below.


Figure 3. Inbox/subfolder Entry for the Folder Column

Was this article helpful to you? Yes No