Receive E-mail (POP3)

Operation Name

Receive E-mail (POP3)

Function overview

Receives emails from Gmail POP3 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 G Suite>@<Domain name on G Suite>".
Password Required Available Enter the password.  
Property Action
Item name Description Remarks
Authentication test Performs authentication test with [User name] and [Password].
  • If the following happens, [Authentication test] is disabled.
    • [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
Encoding Optional Available Select or enter an encoding when receiving mail.
  • [Japanese auto detect (JISAutoDetect)]: (default)
  • [Japanese (JIS)]:(If omitted)
  • [Japanese (Shift JIS)]:
  • [Japanese (EUC)]:
  • [US-ASCII]:
  • [ISO 8859-1]:
  • [UTF-8]:
  • [EUC-KR]:
When specifying the encoding directly in the field, use the encoding supported by Java SE Runtime Environment 8.
Refer to "Supported Encodings"(http://docs.oracle.com/javase/8/docs/technotes/guides/intl/encoding.doc.html) for details.
  • If [Prefer encoding of the message] is [Checked], then give preference to that encoding.
Prefer encoding of the message Optional Not available Select whether to prefer the encoding specified in the message or not when receiving mails.
  • [Checked]:(default)
    If encoding (charset parameter of Content-Type header) is specified in the message, then use the encoding specified in the message.
    Otherwise, use [Encoding] setting.
  • [Not Checked]:
    Regardless of whether encoding is specified in the message, use the [Encoding] setting.
 
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 you specified the host that cannot be connected because process cannot continue even though have checked the provider.
  • Message cannot be received is output 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.
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)
    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]
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>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    
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:
[SYS/PERM] Your account is not enabled for POP access. Please visit your Gmail settings page and enable your account for POP access.
POP is not enabled in Gmail settings of the target user. To use POP, you will need to enable POP in Gmail settings of the target user.
javax.mail.AuthenticationFailedException:
[AUTH] Username and password not accepted.
[User name] or [Password] is incorrect. Check [User name] and [Password].
com.sun.mail.util.MailConnectException: Failed to establish connection to Gmail POP3 server Check the network reach ability.

Notes