Receive E-mail (IMAP4)

Operation Name

Receive E-mail (IMAP4)

Function overview

Receives emails from Gmail 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
Connection Required Not available Select Global Resources.
Refer to "Global Resource Properties" for global resource settings .
  • [Add]:
    Adds new global resource.
  • [Edit list]:
    Global resource settings can be managed from "Edit Resource list".
 
User name Required Available Enter the user name.
  • Enter the user name as the form of "<User name on Google Apps>@<Domain name on Google Apps>".
Password Required Available Enter the password.  
Property Action
Item name Description Remarks
Authentication test Performs authentication test against the [Destination] specified with [Username] and [Password].
  • [Authentication test] becomes disabled when following conditions are true.
    • [User name] or [Password] are not entered.
    • Values specified in [User name] and or [Password] are script variables.
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 mark the messages retrieved as read.
  • [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 The encoding used when messages are received can be either selected from the drop down list or directly specifying the canonical name which represents the encoding.
  • [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 .
  • When Content-Type header in a message has its charset parameter specified, the message is encoded accordingly using the character set.
  • 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)
    Retrieves 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 [Set 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
    "email 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.
    See "Edit Schema" for any details .
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.
ex) /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)
    Overwrites 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.
  • Enabled when [Receive attached file] is [Checked]
Filter
Item name Required/Optional Use of Variables Description Remarks
Receive 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)
    Retrieves 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" ?>
 &lt;table&gt;
   &lt;row&gt;
     <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>
   &lt;/row&gt;
   &lt;row&gt;
     :
   &lt;/row&gt;
 </table>
Column name Description Remarks
Message ID    
UID  
  • Retrieved when [Retrieves UID] is checked,
Sent Date(Received 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.
See " Edit Schema "for any details .

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 of messages retrieved.
  • 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 Stores the type of the occured error.
  • The value defaults to null.
  • Error is represented in the format depicted below.
    Example:java.io.FileNotFoundException
  • The message may vary depending on DataSpider Servista version.
error_message Stores the error message for the occured error.
  • The value defaults to null.
  • The message may vary depending on DataSpider Servista version.
error_trace Stores stack trace of the occurred error.
  • The value defaults to null.
  • The message may vary depending on DataSpider Servista version or the client application used.

Specification Limits

Main exceptions

Exception name Causes Solution
ResourceNotFoundException
Resource definition could not be found.Name: []
[Connection] is not specified. Please specify [Connection].
ResourceNotFoundException
Resource definition could not be found.Name: [<name of Global Resources>]
Resource definition selected in [Connection] is not found. Please check the global resource specified in [Connection].
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:
[ALERT] Your account is not enabled for IMAP use. Please visit your Gmail settings page and enable your account for IMAP access. (Failure)
IMAP is not enabled in Gmail settings of the target user. To use IMAP, you will need to enable IMAP in Gmail settings of the target user.
javax.mail.AuthenticationFailedException:
Invalid credentials <string>
Either [User name] or [Password] is invalid. Check [User name] and [Password].
javax.mail.AuthenticationFailedException:
[AUTHENTICATIONFAILED] Invalid credentials (Failure)
Either [User name] or [Password] may be invalid. Check [User name] and [Password].
javax.mail.MessagingException:
ConnectionException
Failed to establish connection to Gmail IMAP4 server Check the network reach ability.

Notes