One Star

How to inject html code into message of tSendMail

Hi ,
I downloaded a template of mail in html , but i don't know how to put it in the message section of the tSendMail component , i get many errors even when enclose it with "".
And how is can we add a logo ? or images ?
Thanks

  • Data Integration
9 REPLIES
Two Stars

Re: How to inject html code into message of tSendMail

Hi,
Have you used advanced setting for MIME type as HTML for tSendMail component?
Vaibhav
Two Stars

Re: How to inject html code into message of tSendMail

One Star

Re: How to inject html code into message of tSendMail

Thanks a lot , too bad we have to make a lot of rewriting into the html code with escape sequences and the + ...
Two Stars

Re: How to inject html code into message of tSendMail

Yes it is too difficult and needs lots of patience... Even you can have tjavarow component which converts input data to table format and stores it into the context variable. Once everything is read and stored, then use that context variable in the body of tsendmail to display the actual table... this is much more painful... and difficult for the one who does not no html coding and manage string and integer conversions...
One Star

Re: How to inject html code into message of tSendMail

Thanks everyone for the help i managed to do this , and here is the result .
Two Stars

Re: How to inject html code into message of tSendMail

Hi largouwalid,
It would be great if you can pl tell or provide an approach with some important part of code, so that me/others too can make use of it if required in future.
Thanks
Vaibhav
One Star

Re: How to inject html code into message of tSendMail

Hi ,
So what i did is find a free template online ( i took this one : http://templates.cakemail.com/details/blitz ).
Then the steps i did were :
- Search and replace " by \" (To escape the caracter)
- Added " at the begin at every line , and "+ at the end of every line (except the last line)
- Copied the code into tJava after creating a context variable like this
context.Message = " My HTML Code " (see image)
- And finaly put in the tSendMail component Message : context.Message
Hope it will help.
Two Stars

Re: How to inject html code into message of tSendMail

Great thanks...
Four Stars

Re: How to inject html code into message of tSendMail

Hey, did you try to add any CSS styling to your solution? it doesn't seen to work for me