Drop the components from the Palette onto the
workspace: cFile, cMail and cProcessor,
respectively labelled as Mail_to_send,
Send_Mail and Mail_Sent.
Link the components using a Row > Route connection.
Double-click cFile to open its Basic settings view in the Component tab.
Click the […] button next to the Path field to select the folder that has the file to
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
Double-click cMail to open its Basic settings view in the Component tab.
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
Talend Studio User
Guide.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.
Double-click cProcessor to open its Basic settings view in the Component tab.
In the Code box, enter the code below to give
a prompt after the mail is sent.1System.out.println("Mail sent");
Save the route and press F6 to run.
Document get from Talend https://help.talend.com
Thank you for watching.