sending an HTML CSS formated with tsendmail

Highlighted
Six Stars

sending an HTML CSS formated with tsendmail

I'm trying to send an email with tsend mail using an HTML CSS template.

 

here's my job: 

Capture.PNG

I tried to add this into my TjavaRow :

String msg = ((String)globalMap.getOrDefault("mailMsg", "<table><tr><th>Num de Chassis</th></tr>"));
msg = msg +
 "<tr>" +
 "<td>" + Sortie.Num_Chassis + "</td>" +
 "</tr>";

but I'm getting this in my email :

Capture.PNG

Can you help with this ?


Accepted Solutions
Highlighted
Forteen Stars

Re: sending an HTML CSS formated with tsendmail

Hi,

 

Talend of course not the best tool for sending email :-)

but something possible

 

do you enable HTML format?

Screen Shot 2019-01-29 at 10.58.39 PM.png

 

 

 

-----------

View solution in original post


All Replies
Highlighted
Forteen Stars

Re: sending an HTML CSS formated with tsendmail

Hi,

 

Talend of course not the best tool for sending email :-)

but something possible

 

do you enable HTML format?

Screen Shot 2019-01-29 at 10.58.39 PM.png

 

 

 

-----------

View solution in original post

Highlighted
Six Stars

Re: sending an HTML CSS formated with tsendmail

Now It's working, 

 

But I need it to send all the rows in one mail, is it possible and if so how ?

Highlighted
Forteen Stars

Re: sending an HTML CSS formated with tsendmail

in theory - yes, but you need prepare HTML body before tSendMail

 

then use prepared variable as email body text

 

personally I - use prepared HTML text with few included variables (like name, account + etc) and attachment (csv or pdf)

so, first - prepare atttachment, then prepare text, and send email with attachments

-----------
Highlighted
Six Stars

Re: sending an HTML CSS formated with tsendmail

I'm preparing my HTML body in tjavaRow! I'm just confused what do you mean by attachments! Do you mean I should Include the row that I want to print in my email in the file I attach? 

 

 

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog