Mail sending - Cloud - 8.0

Mail (Mediation)

Version
Cloud
8.0
Language
English
Product
Talend Data Fabric
Talend Data Services Platform
Talend ESB
Talend MDM Platform
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
2024-02-21

Procedure

  1. Drop the components from the Palette onto the workspace: cFile, cMail and cProcessor, respectively labeled as Mail_to_send, Send_Mail and Mail_Sent.
  2. Link the components using a Row > Route connection.
  3. Double-click cFile to open its Basic settings view in the Component tab.
  4. Click the [...] button next to the Path field to select the folder that has the file to send.
  5. In the FileName field, enter the name of the file to send, test mail.txt in this use case. Keep the default setup of other items.
    The content of this file is test mail body.
  6. Double-click cMail to open its Basic settings view in the Component tab.
  7. In the Protocols list, select smtps.
    In the Host field, type in the host name of the smtp server, smtp.gmail.com in this use case.
    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 Using contexts and variables.
    Keep the default setting of the ContentType field, text/plain.
    In the To field, enter the receiver of the mail, which is also in the form of context variable in this example.
  8. Double-click cProcessor to open its Basic settings view in the Component tab.
  9. In the Code box, enter the code below to give a prompt after the mail is sent.
    System.out.println("Mail sent");
  10. Save the Route and press F6 to run.