Double-click the tPOP component to open
its Basic settings view.
- In the Host field, enter the IP address of the email server you want to connect to.
- In the Port field, enter the port number of the email server.
- Select Basic from the Authentication mode drop-down list and provide the username and password to use to read the emails in the corresponding fields.
- In the Output directory field, specify the path where email messages will be downloaded and stored as files.
- In the Filename pattern field, define the file name for each individual email message. Each message will be downloaded and stored as a file on disk. You can press Ctrl+Space to display the list of predefined patterns. In this example, the name of the files for each email will be named using a combination of date, year, file and count. The files will have a .mail extension. Therefore, we will enter the expression TalendDate.getDate("yyyyMMdd-hhmmss") + "_" + (counter_tPOP_1 + 1) + ".mail" as the filename pattern.
- Select the Retrieve all emails? check box if you want to retrieve all email messages present on the specified server. If you do not want to retrieve all emails, you can specify the number of email you want to retrieve in the Number of emails to retrieve field. In this example, we want to retrieve 10 emails.
- Select the Newer email first check box to retrieve the most recent email messages according to the number specified in the Number of emails to retrieve field.
Clear the Delete emails from server check box to keep
the retrieved email messages on the server.
Note: For Gmail servers, this option does not work for the POP3 protocol. Select the IMAP protocol and ensure that the Gmail account is configured to use IMAP.
- Select the protocol from the Choose the protocol drop-down list, imap in this example.
Select the Use SSL check box to enable the component to
open an SSL connection when communicating with the mail server.
Note: This option is obligatory for users of Gmail.
- Go to the Advanced settings tab, click the [+] button under the Filter table and add a filter item Subject with the pattern value "Talend Jobs" to filter emails with this value.