Skip to main content Skip to complementary content

Retrieving emails from an email server

Procedure

  1. Double-click the tPOP component to open its Basic settings view.
  2. In the Host field, enter the IP address of the email server you want to connect to.
  3. In the Port field, enter the port number of the email server.
  4. Provide the Username and Password to use to read the emails.
  5. In the Output directory field, specify the path where email messages will be downloaded and stored as files.
  6. 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.
  7. 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.
  8. 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.
  9. Clear the Delete emails from server check box to keep the retrieved email messages on the server.
    Information noteNote: 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.
  10. Select the protocol from the Choose the protocol drop-down list, imap in this example.
  11. Select the Use SSL check box to enable the component to open an SSL connection when communicating with the mail server.
    Information noteNote: This option is obligatory for users of Gmail.
  12. 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.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!