Mail receiving - 7.3

Mail (Mediation)

Version
7.3
Language
English
Product
Talend Data Fabric
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for ESB
Talend Real-Time Big Data Platform
Module
Talend Studio
Content
Data Governance > Third-party systems > Messaging components (Mediation) > Mail components (Mediation)
Data Quality and Preparation > Third-party systems > Messaging components (Mediation) > Mail components (Mediation)
Design and Development > Third-party systems > Messaging components (Mediation) > Mail components (Mediation)
Last publication date
2023-06-12

Procedure

  1. Drop the components from the Palette onto the workspace: cMail and cProcessor, respectively labelled as Receive_Mail and Mail_Body.
  2. Link the components using a Row > Route connection.
  3. Double-click cMail to open its Basic settings view in the Component tab.
  4. In the Protocols list, select imaps.
  5. In the Host field, type in the host name of the imap server, imap.gmail.com in this use case.
  6. In the Port field, type in the port number, 993 in this use case.
  7. In the UserName and Password fields, enter the login authentication credentials, which are in the form of context variables in this example. For more information about context variable setup, see Talend Studio User Guide.
  8. Keep the default setting of the ContentType field, text/plain.
  9. Double-click cProcessor to open its Basic settings view in the Component tab.
  10. In the Code box, enter the code below to print the mail body.
    System.out.println(exchange.getIn().getBody(String.class));
  11. Save the route and press F6 to run.
    As shown above, the mail has been received and its content is test mail body.