Scenario: Retrieving a selection of email messages from an email server - 6.1

Talend Components Reference Guide

EnrichVersion
6.1
EnrichProdName
Talend Big Data
Talend Big Data Platform
Talend Data Fabric
Talend Data Integration
Talend Data Management Platform
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for Big Data
Talend Open Studio for Data Integration
Talend Open Studio for Data Quality
Talend Open Studio for ESB
Talend Open Studio for MDM
Talend Real-Time Big Data Platform
task
Data Governance
Data Quality and Preparation
Design and Development
EnrichPlatform
Talend Studio

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.