Skip to main content
Skip table of contents

IMAP

The adapter receives, copies/moves, or deletes an email message in an Internet Message Access Protocol (IMAP) mailbox, sets a flag, or lists message headers in a folder of an IMAP mailbox.

The adapter supports S/MIME encrypted/signed messages and SSL encryption of the connection to the IMAP server (IMAPS). Any Java Mail Properties can be processed from a Properties file.

Note:

The default block size (16 KB) during message transfer can be set via the JavaMail system property mail.iMAP.fetchsize in the runtime environment of the X4 server (usually Java VM with application server) to optimize the download of emails via IMAP.

Example of the Jboss startup script, block size is set to 5 MB:

CODE
@set JAVA_OPTS=%JAVA_OPTS% -Dmail.imap.fetchsize=5242880

Properties

Operation

Describes which operation the adapter performs.

Possible values:

  • Receive Message: Receive message with ID specified in messageID parameter as a UTF-8 encoded XML document.

  • Receive EML Message : Receive message with ID specified in messageID parameter and save it as an .eml file (MS Outlook).

Note:

You can forward the received message by directly connecting the IMAP adapter to the POP/SMTP adapter.

  • List Messages: List message headers of an IMAP folder specified in the folder parameter in an UTF-8 encoded XML document.

  • Copy Message: Copy message whose message ID is specified in the messageID parameter to the IMAP folder specified in the folder parameter.

  • Move Message: Move message whose message ID is specified in the messageID parameter to the IMAP folder specified in the folder parameter.

  • Delete Message: Delete message whose message ID is specified in the messageID parameter from the IMAP server.

  • Set Flag : Mark message whose message ID is specified in the messageID parameter with one or more flags that are specified in the flags parameter.

Parameters

Adapter

Main class of the adapter (do not change!)

Possible values: de.softproject.integration.adapter.imap.Adapter: Main class (default)

imapServer

IP address or host name of the IMAP server

Possible values: Any valid string (for example, imap.1und1.de)

login

User name for the email account used

Possible values: Any string

password

Password for the email account used

Possible values: Any string

oAuth2

Specifies whether to use the OAuth 2.0 protocol for login.

Possible values:

  • true: oAuth2 is used for login

  • false: oAuth2 is not used for login

If OAuth 2.0 is to be used,

  • you need to enable SSL encryption for the connection to the IMAP server by setting the SSL parameter.

  • you need to enter the access token for the password parameter.

folders

Destination folder on the IMAP server (if the Operation property is set to Copy Message or Move Message) or folder whose messages are be listed (if the Operation property is set to List Messages)

Possible values: Existing folder name (case-sensitive)

Frequently used:

  • INBOX

  • Drafts

  • Sent Messages

  • Junk

  • Deleted messages

  • Archives

  • Notes

srcFolder

Source folder for the Copy Message, Move Message, Receive Message, Set Flag, and Delete Message actions.

Possible values: Existing folder name (case-sensitive)

Frequently used:

  • INBOX

  • Drafts

  • Sent Messages

  • Junk

  • Deleted messages

  • Archives

  • Notes

flags

IMAP flag(s) used to identify an e-mail message; multiple flags are separated by semicolons (;) (if the Operation property is set to Set Flag)

Possible values: Any flag (e.g. \Answered)

messageID

(MessageID)

Message ID of the email including folder specification

Possible values: Folder name and message ID (with angle brackets) (e.g., INBOX/<831921101.31255094008434.java mail.javamailuser@localhost>)

uid

Message ID on the IMAP server

Possible values: Any integer

maxMessages

Limit the number of messages to be listed if the Operation property is set to List Messages. The list starts with the oldest messages in the folder.

Possible values: Any integer

base64

Always encode messages attachments (multipart parts) using Base64 (if the Operation property is set to Receive Message)

Possible values:

  • yes: Encode all multipart parts using Base64

  • no: Do not encode using Base64 (default)

encrypt

Messages are encrypted with S/MIME (Multipart/Encrypted)

Possible values:

  • yes: Enable S/MIME encryption (requires defining the key/certificate file in the Pkcs12 parameter and the passphrase in the passphrase parameter)

  • no: No encryption (default)

sign

Messages are signed with S/MIME (Multipart/Signed)

Possible values:

  • yes: Process the S/MIME signature (requires definition of the key/certificate file in the Pkcs12 parameter and the passphrase in the passphrase parameter)

  • no: No signature (default)

Pkcs12

Path to a valid key/certificate file in the PKCS#12 format

Possible values: Any valid path specification in the local file system of the X4 Server (e.g. %USER_COLLECTION\PROJECT\FOLDER\KEY.p12)

passphrase

Password/passphrase to the key/certificate in PKCS#12 format that you specified in the Pkcs12 parameter.

Possible values: Any valid string

port

Port of the IMAP server

Possible values:

  • Any integer (e.g., 993)

  • (No value): Use the default port 143

ssl

Enable SSL encryption for the connection to the IMAP server

Possible values:

  • Yes: Use IMAP over SSL (IMAPS)

  • No: Do not encrypt the connection (default)

propertiesURL

URL to a properties file (XML or text) that can contain any Java Mail Properties

Possible values:

  • Any valid URL to a properties file (e.g. xstore://Project/Folder/ mail.properties)

  • (empty): Do not process Java Mail Properties

propertiesType

Format of the properties file specified in the propertiesURL parameter

Possible values:

  • TEXT: Interpret as text properties (default)

  • XML: Interpret as XML properties

Status values

1

The operation was successful.

0

The operation was performed, but no result was found or no data was changed.

-1

The operation could not be performed.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.