Email Import


This document describes the various types of protocols and security configurations supported by Ephesoft Transact to connect with various types of Email Services.

Overview of Email Import

Email Import is one of the various ways to provide input files for processing in Ephesoft Transact.

In Email Import, an email account is configured for a Batch Class and then Transact keeps an eye on the configured email folder of that email account to retrieve and process any new mail coming to that folder. Transact marks the email as read after importing into the system for processing.

For Email Import configuration details, refer here.

Supported Protocols

Ephesoft Transact supports following three protocols to connect with Email Servers:

  • POP3
  • IMAP
  • Exchange

Each of the above 3 protocols is described below.

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

POP3 (Post Office Protocol version 3)

POP3 is a standard mail protocol used to fetch emails from a remote email server to a local email client. It is supported by almost all modern email servers and clients.

POP3 works by contacting email service and downloading all new messages from it. Once they are downloaded onto the client machine, they are deleted from the email server automatically. This means that after the email is downloaded, it can only be accessed using the same email client. If you try to access email from a different device, the messages that have been previously downloaded won’t be available.

How POP works in a nutshell:

  1. Connects to the mail server on port 110 (or 995 for Secure mode connections);
  2. Retrieves email messages;
  3. Deletes copies of the messages stored on the server; and
  4. Disconnects from the server.

Below image shows an example of the Email Import configuration with POP3:


IMAP (Internet Message Access Protocol)

IMAP is a standard protocol for accessing email on a remote server from a local client. It is an application layer Internet Protocol using the underlying transport layer protocols to establish host-to-host communication services for applications.

It is supported by most of modern email servers and clients.

Here’s how IMAP works in a nutshell:

  1. Connects to the mail server on port 143 (or 993 for SSL/TLS connections);
  2. Retrieves email messages;
  3. Stays connected until the mail client app is closed and downloads messages on demand.

Note: Messages aren’t deleted on the server by default.

Below image shows an example of the Email Import configuration with IMAP:


Exchange (Exchange Web Services (EWS))

Exchange Web Services (EWS) is an application program interface (API) that allows to access Microsoft Exchange emails.

A Web URL is required for the Email Import configuration with Exchange, as shown below:


How to obtain EWS URL for the Exchange configuration:

EWS URL for Microsoft Exchange Online / Office 365 –


EWS URL for Microsoft Exchange (on premise) –



Why Exchange or EWS?

Exchange protocol can be used only to connect with Microsoft Exchange Servers.

But as IMAP and POP3 are already available to connect with Microsoft Exchange Servers, then why do we need Exchange?

The answer to the above is that Microsoft can stop support for IMAP and POP3 in future. By default, exchange servers come with IMAP and POP3 protocol disabled. Prior to Ephesoft Transact 4.5, the user needed to enable the IMAP or POP3 protocol on exchange server explicitly to enable email import in Transact. Now they can import emails without enabling these two protocols, using exchange web service functionality. So EWS is an alternative for import mechanism for users who don’t want to enable IMAP or POP3 on their Exchange server.


Security Types

Transact supports three security types shown in the image below:

PLAINTEXT – In this mode, communication between email server and Ephesoft Transact will be in plain text. Content exchanged between both parties will not be encrypted. Hence it is unsecured way of communicating. No one uses this mode except some in house-developed or open source email servers.

SECURED – In this mode, communication between email server and Ephesoft Transact will be in encrypted mode. Content exchanged between both parties will be encrypted. This method of communication is used for most servers. If the security type is selected as SECURED and the mail server doesn’t support secure mode, an error occurs at the application end while authenticating the connection.

STARTTLS – This security type takes an existing insecure connection and upgrades it to a secure connection using SSL/TLS. By default, the first communication is performed in the form of plain-text and during the handshaking process both the parties agree on communicating further on secure connection. If any of the parties don’t support secure connection they can either choose to continue communicating over plain text or one can stop the communication.

STARTLS came into picture to use single port (generally plain-text mode port) for both plain-text and secure mode communication. Earlier two different ports were used for plain text and secure mode communication.

The following web article is very helpful in understanding the STARTTLS mode:

Server/security types, ports, and dependencies:

Server Type Security Type Port Comments
IMAP PLAINTEXT 143 Supported
IMAP SECURED (SSL/TLS) 993 Supported
IMAP STARTTLS 143 Supported

Gmail does not support IMAP with STARTTLS.

POP3 PLAINTEXT 110 Supported
POP3 SECURED (SSL/TLS) 995 Supported
POP3 STARTTLS 110 Supported
EXCHANGE Web service (EWS) Security Type and Port fields are disabled because EWS URL is used


Microsoft On-Premise Exchange refers to locally hosted Exchange server, which runs generally within the organizational network.

On the other hand, Outlook Live or Office 365 are the cloud variant of Exchange server.

For more details, refer here.


Important Points

  1. In Ephesoft Transact, Exchange or EWS is currently supported with the following cloud Exchange servers:
  2. IMAP can also be used to connection with Exchange on-premise server if the user enables the IMAP protocol on Exchange server.
  3. For POP3 and Exchange, the Folder column is not editable, and INBOX is the only folder that can be configured with POP3. POP3 doesn’t support any other folder than INBOX folder.
  4. IMAP and POP3 are much more mature as compared to Exchange/EWS.
  5. If Exchange is configured as Server Type, Ephesoft Transact does not support processing attachments in .msg format.
  6. If Exchange is configured as Server Type, Email Headers Feature does not work.