tPOP
Fetches one or more email messages from a server using the POP3 or IMAP
protocol.
tPOP uses the POP or IMAP protocol to
connect to a specific email server. Then it fetches one or more email messages and
writes the recovered information in specified files. Parameters in the Advanced
settings view allows you to use filters on your selection.
tPOP Standard properties
These properties are used to configure tPOP running in the Standard Job framework.
The Standard
tPOP component belongs to the Internet family.
The component in this framework is available in all Talend
products.
Basic settings
Host |
IP address of the email server you want to connect to. |
Port |
Port number of the email server. |
Username and Password |
User authentication data for the email server.
Username: enter the username you use to
Password: enter the password you use to |
Output directory |
Enter the path to the file in which you want to store the email |
Filename pattern |
Define the syntax of the names of the files that will hold each of the |
Retrieve all emails? |
Select this check box to retrieve all email messages present on the |
Number of emails to retrieve |
Enter the number of email messages you want to retrieve. This field is available only when the Retrieve |
Newer email first |
Select this check box to retrieve the most recent email messages This check box is available only when the Retrieve all emails? check box, which is selected by |
Delete emails from server |
Select this check box if you do not want to keep the retrieved email Note:
For Gmail servers, this option does not work for the pop3 |
Choose the protocol |
From the list, select the protocol to be used to retrieve the email |
Use SSL |
Select this check box if your email server uses this protocol for Note:
This option is obligatory for users of Gmail. |
Advanced settings
tStatCatcher Statistics |
Select this check box to gather the job processing metadata at a job |
Filter |
Click the plus button to add as many lines as needed to filter email |
 |
Filter item: select one of the
From: email messages are filtered
To: email messages are filtered
Subject: email messages are filtered
Before date: email messages are
After date: email messages are filtered |
 |
Pattern: press Ctrl+Space to display the list of available values. |
Filter condition relation |
Select the type of logical relation you want to use to combine the
and: the conditions set by the filters
or: the conditions set by the filters |
Global Variables
Global Variables |
ERROR_MESSAGE: the error message generated by the
NB_EMAIL: the number of emails received. This is an After
CURRENT_FILE: the current file name. This is a Flow
CURRENT_FILEPATH: the current file path. This is a Flow A Flow variable functions during the execution of a component while an After variable To fill up a field or expression with a variable, press Ctrl + For further information about variables, see |
Usage
Usage rule |
This component does not handle data flow, it can be used alone. |
Limitation |
When the Use SSL check box or the |
Retrieving a selection of email messages from an email server
This scenario is a one-component Job that retrieves a predefined number of email
messages from an email server.
-
Drop the tPOP component from the Palette to the design workspace.
-
Double click tPOP to display the Basic settings view and define the component
properties. -
Enter the email server IP address and port number in the corresponding
fields. -
Enter the username and password for your email account in the corresponding
fields. In this example, the email server is called Free.

-
In the Output directory field, enter the
path to the output directory manually, or click the three-dot button next to the
field and browse to the output directory where the email messages retrieved from
the email server are to be stored. -
In the Filename pattern field, define the
syntax you want to use to name the output files that will hold the messages
retrieved from the email server, or press Ctrl+Space to display a list of predefined patterns. The syntax
used in this example is the following:
TalendDate.getDate("yyyyMMdd-hhmmss") + "_" + (counter_tPOP_1 + 1) +
.
".txt"The output files will be stored as .txt files and are defined by date, time
and arrival chronological order. -
Clear the Retrieve all emails? field and in
the Number of emails to retrieve field, enter
the number of email messages you want to retrieve, 10 in this example. -
Select the Delete emails from server check
box to delete the email messages from the email server once they are retrieved
and stored locally. -
In the Choose the protocol field, select the
protocol type you want to use. This depends on the protocol used by the email
server. Certain email suppliers, like Gmail, use both
protocols. In this example, the protocol used is pop3. -
Save your Job and press F6 to execute
it.

The tPOP component retrieves the 10 recent messages
from the specified email server.
In the tPOP directory stored locally, a .txt file is created for
each retrieved message. Each file holds the metadata of the email message headings
(sender’s address, recipient’s address, subject matter) in addition to the message
content.