Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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

Labels (2)
12 Replies
Anonymous
Not applicable
Author

Hi,
Have you used advanced setting for MIME type as HTML for tSendMail component?
Vaibhav
Anonymous
Not applicable
Author

Anonymous
Not applicable
Author

Thanks a lot , too bad we have to make a lot of rewriting into the html code with escape sequences and the + ...
Anonymous
Not applicable
Author

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...
Anonymous
Not applicable
Author

Thanks everyone for the help i managed to do this , and here is the result .
0683p000009MAEm.jpg
Anonymous
Not applicable
Author

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
Anonymous
Not applicable
Author

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.
Anonymous
Not applicable
Author

Great thanks...
Anonymous
Not applicable
Author

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