Receive E-mail (IMAP4)

Operation Name

Receive E-mail (IMAP4)

Function Overview

Receive mail from the IMAP4 server.

Data Model

Data model of this type of component is table model type.

Properties

For information about using variables, refer to "variables".
Basic settings
Item name Required / Optional Use of Variables Description Remarks
Name Required Not available Enter the name on the script canvas.  
Required settings
Item name Required / Optional Use of Variables Description Remarks
Destination Required Not available Select Global Resources.
Refer to "Global Resource Properties" to set up a global resource.
  • [Add]:
    Adds new global resource.
  • [Edit list]:
    Global resource settings can be edited with "Edit Resource list".
 
User name Required Available Enter the user name.  
Password Required Available Enter the password.  
Property Action
Item name Description Remarks
Authentication test Use [User name], [Password] to test login to the specified [Destination].
  • If the following happens, [Authentication test] is disabled.
    • [User name] or [Password] are not entered.
    • [User name] or [Password] is specified in variable
Receive Settings
Item name Required / Optional Use of Variables Description Remarks
After receiving e-mail Required Not available Select whether to delete received messages from the server.
  • [Do not delete]: (default)
  • [Delete]:
 
Mark as read after receiving Optional Not available Select whether to read the received message.
  • [Checked]: (default)
    Read the received message.
  • [Not Checked]:
    Do not read received messages.
    Read messages state will remain as read messages..Unread messages state will remain unread messages
  • Read means to mark the SEEN the flag.
Encoding Optional Available Select or enter an encoding when receiving mail.
  • [Japanese auto detect (JISAutoDetect)]: (default)
  • [Japanese (JIS)]:
  • [Japanese (Shift JIS)]:
  • [Japanese (EUC)]:
  • [US-ASCII]:
  • [ISO 8859-1]:
  • [UTF-8]:
  • [EUC-KR]:


Use only the canonical name supported by Java SE Runtime Environment 8 when specifying the encoding directly in the field.
Refer to "Supported Encodings"(http://docs.oracle.com/javase/8/docs/technotes/guides/intl/encoding.doc.html) for details.
  • If the encode is specified by the message,(If Content-Type header charset parameter has been set) use the encoding specified by the message.
  • If omitted, receive in "JIS".
Folder name Optional Available Enter the name of the folder to receive.
  • The default value is "inbox".
  • If omitted, receive in "inbox".
Receive in newly arrived order Optional Not available Select whether to receive messages in the order of new.
  • [Checked]:
    Obtain messages from the newest.
    The last message received is obtained first.
  • [Not Checked]: (default)
    Obtain messages from the oldest.
    The first message received is obtained first.
 
Set maximum reception number Optional Not available Select whether to specify the maximum number of messages received.
  • [Checked]:
    Receive messages with a specified maximum number.
  • [Not Checked]: (default)
    Receive all messages.
 
Maximum reception number Required Available Specifies the maximum number of messages received.
For example, when it contains 100 messages on the server, and the number of maximum reception is set to 10 , receive only 10 messages from the top and the rest 90 will remain unread.
  • Enabled when [Maximum reception number] is [Checked].
Skip message that cannot be received Optional Not available Select the operation that receives the message that cannot be received.
  • [Checked]:
    Messages that cannot be received will be skipped and continue to process.
  • [Not Checked]: (default)
    An error occurs when receives a message which cannot be received.
  • If checked, when an error occurs when receiving messages, receiving messages process will be skipped and continue to process.
  • Connection error remains an error when specified the host that cannot be connected because process cannot continue even though have checked the provider.
  • Message cannot be received is outputted as the log level "WARN".
Get only address Optional Not available Select the form when receive data such as (From, To, Cc, Reply-To) either
    "Description <mail address>"
or
    "mail address"
.
  • [Checked]:
    Receive as the form of "mail address"
  • [Not Checked]: (default)
    Receive as the form of "Description <address>".
  • If omitted, "address" will be selected.
Get UID Optional Not available Select whether to get UID.
  • [Checked]:
    Get the UID.
  • [Not Checked]: (default)
    Do not get UID.
  • If checked schema will be added to the UID column.Refer to here for details.
    For any details, please refer to the 'Editing Schema'
Attached file
Item name Required / Optional Use of Variables Description Remarks
Receive attached file Optional Not available Select whether to receive attachments.
  • [Checked]: (default)
    Receive files attached to messages.
  • [Not Checked]:
    Do not receive the file attached to the message.
 
Directory for storing received attachments Required Available Enter the store directory to the files attached.

If the [Browse] button is pressed ,directory Selectr launched, then the directory can be selected.

Mechanism of the generating of the path of the files stored will be the file name of ${destination}/${message ID}/.
Addition, ${message ID} is the variable set by the mail server.

If the store destination is set to /tmp and attached to the test.txt, it will generate as follows.
Example: /tmp/18926678.1130237227441.JavaMail.account@mail.com/test.txt
If file of same name as attached file exists Required Not available Select the behavior when there is an attachment file of the same name.
  • [Overwrite]: (default)
    Overwrite the file.
  • [Assign sequence number]:
    Give the sequence number like"<File name> _1.csv" and so on.If there is an extension, the sequence number is given to the name before the extension.
  • Enable when [Receive attached file] is [Checked].
Filter
Item name Required / Optional Use of Variables Description Remarks
Received unread messages only Optional Not available Select whether to receive unread messages (SEEN flag message is not marked)
  • [Checked]:
    Receive only unread messages .
  • [Not Checked]: (default)
    Receive all messages.
 
Header
Item name Required / Optional Use of Variables Description Remarks
Header list Optional - Specify the header retrieved.
  • Refer to schema if you set the schema information for the header.
Header list / Header Required Available Enter key to retrieve the header.
  • Double-byte key value is not supported.
  • If the value contains double-byte header, the header values that must be encoded by 2047.
Data processing method
Item name Required / Optional Use of Variables Description Remarks
Mass data processing Required Not available Select a data processing method.
  • [Use script settings]: (default)
    Apply mass data processing settings of script property to adapter.
  • [Disable]:
    Mass data processing is not performed.
  • [Enable]:
    Mass data processing is performed.
 
Comment
Item name Required / Optional Use of Variables Description Remarks
Comment Optional Not available You can write a short description of this adapter.
The description will be reflected in the specifications.
 

Schema

Input Schema

None.

Output Schema

<?xml version="1.0" encoding="UTF-8" ?>
 <table>
   <row>
     <column>Message ID</column>
     <column>UID</column>
     <column>Sent Date</column>
     <column>Header 1</column>
     <column>Header 2</column>
       :
     <column>From</column>
     <column>To</column>
     <column>CC</column>
     <column>BCC</column>
     <column>Reply To</column>
     <column>Subject</column>
     <column>Content-Type</column>
     <column>Message</column>
     <column>Attachments</column>
   </row>
   <row>
     :
   </row>
 </table>
Column name Description Remarks
Message ID    
UID  
  • Retrieved when [Retrieves UID] is checked.
Sent Date    
Header The element occurs for each key specified in the [Header List].
  • If a single key holds multiple values, they are represented as a comma-delimited string.
  • No element occurs if nothing is specified in the [Header List].
From  
  • If there are multiple values specified, they are represented as a comma-delimited string.
To  
  • If there are multiple values specified, they are represented as a comma-delimited string.
CC  
  • If there are multiple values specified, they are represented as a comma-delimited string.
BCC  
  • If there are multiple values specified, they are represented as a comma-delimited string.
Reply To  
  • If there are multiple values specified, they are represented as a comma-delimited string.
Subject    
Content-type    
Message    
Attachments  
  • If there are multiple values specified, they are represented as a comma-delimited string.

Loading schema in Mapper

Schema is loaded automatically.
For any details, please refer to the 'Editing Schema'

Mass data processing

Mass data processing is supported.

PSP Usage

PSP is not supported.

Available component variables

Component variable name Description Remarks
count Returns the number received.
  • The value defaults to null.
message_category Stroes the category to which corresponding message code belongs to, when an error occurs.
  • The value defaults to null.
message_code Stores its corresponding message code of occured error.
  • The value defaults to null.
message_level Stores the severity of the corresponding message code of the occured error.
  • The value defaults to null.
error_type Returns the error type when error occurred.
  • The value defaults to null.
  • Error is represented in the format depicted below.
    Example:java.io.FileNotFoundException
  • The message may vary depending on the DataSpider Servista version.
error_message Return the error message when error occurred.
  • The value defaults to null.
  • The message may vary depending on the DataSpider Servista version.
error_trace Return trace information when error occurred.
  • The value defaults to null.
  • The message may vary depending on the DataSpider Servista version or the client application used.

Specification Limits

Main exceptions

Exception Name Causes Solution
ResourceNotFoundException
Resource definition could not be found.Name:[]
[Destination] is not specified. Please specify [Destination] .
ResourceNotFoundException
Resource definition could not be found.Name: [<name of Global Resources>]
Resource definition selected in [Destination] is not found. Please check the global resource specified in [Destination]
InvalidPropertyConfigurationException
<Property name> is not specified.
[<Property name>] is not specified. Specify the [<Property name>] .
java.io.UnsupportedEncodingException Encoding set to [Encoding] is not supported. Please check the specified encoding in [Encoding] .
javax.mail.AuthenticationFailedException: [User name] or [Password] is incorrect. Check [User name] and [Password] .
javax.mail.MessagingException:
ConnectionException
[Hostname] failed to connect to the specified host. Check that you are not wrong about [Hostname], [Port number] . Check whether services are provided in the specified host specified in [Hostname].
javax.mail.MessagingException:
UnknownHostException
[Hostname] not found . Please check the host name specified with [Hostname].
javax.mail.MessagingException:
SSLHandshakeException
It occurs when selected [SSL Connection] in global resource properties.
The reason is that the server certificate registered in Java is different from the one that is used to SSL connection,so the validity cannot be verified.
Check if the server certificate is registered in JAVA when connecting to SSL server. If registered,check if the server is the same as the one registered in JAVA and check if the server certificate has expired.