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 JBossstartup script, block size is set to 5 MB:
@set JAVA_OPTS=%JAVA_OPTS% -Dmail.imap.fetchsize=5242880
Properties
Operation | Determines which operation the adapter executes Possible values:
Note: You can forward the received message by directly connecting the POP/SMTP adapter after the IMAP adapter.
|
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 (e. g. imap.1und1.de) |
login | Username for the email account used Possible values: Any string |
password | Password for the email account used Possible values: Any string |
oAuth2 | Defines if the OAuth 2.0 protocol is used for log-in. Possible values:
If the OAuth 2.0 protocol is used,
|
folder | Destination folder on the IMAP server (if the Operation property is set to Copy Message orMove Message gesetzt ist) or folder whose messages are to be listed (if the Operation property is set to List Messages ) Possible values: Existing folder name (case sensitive) Frequently used:
|
srcFolder | Source folder for Copy Message, Move Message, Receive Message, Set Flag and Delete Message. Possible values: Existing folder name (case sensitive) Frequently used:
|
flags | IMAP flag(s) to identify an email message; multiple flags are separated by semicolons (;) (if the Operation property is set to Set Flag) Possible values: Any flag (e.g. \Answered) |
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 list when the operation property is set to List Messages. The listing starts with the oldest messages in the folder. Possible values: Any integer |
base64 | Always base64 encode message attachments (multipart parts) (if Operation property is set to Receive Message ) Possible values:
|
encrypt | Messages are encrypted with S/MIME (Multipart/Encrypted) Possible values:
|
sign | Messages are signed with S/MIME (Multipart/Signed) Possible values:
|
Pkcs12 | Path to a valid key/certificate file in 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 file in PKCS#12 format that you specified in parameter Pkcs12. Possible values: Any valid string |
port | Port of the IMAP server Possible values:
|
ssl | Enable SSL encryption for the connection to the IMAP server Possible values:
|
propertiesURL | URL to a properties file (XML or text) that can contain any Java Mail properties Possible values:
|
propertiesType | Format of the properties file specified in Possible values:
|
Status values
1 | The operation was executed successfully. |
0 | The operation was performed, but no result was found or no data was changed. |
-1 | The operation could not be performed. |