Author |
Message
|
rajbuddha |
Posted: Thu Oct 08, 2015 7:35 am Post subject: EmailOutput Node for sending tablestructure & colors inE |
|
|
 Apprentice
Joined: 02 Aug 2011 Posts: 47 Location: chennai
|
Hi Team ,
Request: EmailOutput Node for sending table structure & colors inEmailBody
I need to send an email report with report/result information as Table structure in email and errored info with RedColor text in emailBody .
I tried lot of research in Infocenter and this forum too , everywhere I could find I can do that using type as "text/html" but no where I could see info about how to pass color and table syntax specifications .
Please help me if you have any info on this .
I am using below tech stack
IIB-v9.0.0.3
MQ V7.5
Thanks in advance . _________________ -----------
Raju Buddha
Never Wait for your 2nd Opportunity..!Becoz it may be harder than the 1st One... |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Oct 08, 2015 7:46 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
An email message is a MIME document.
The contents of each part of that MIME document are entirely dependent on what the email should contain.
MIME has no concept of "Tables" or "colors".
Perhaps you're thinking of an email message with HTML content. _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
ganesh |
Posted: Fri Oct 09, 2015 10:17 am Post subject: |
|
|
Master
Joined: 18 Jul 2010 Posts: 294
|
Use html tags to create table structure and for assigning color. |
|
Back to top |
|
 |
rajbuddha |
Posted: Fri Oct 09, 2015 10:48 am Post subject: |
|
|
 Apprentice
Joined: 02 Aug 2011 Posts: 47 Location: chennai
|
Hi mqjeff thanks for info . I am reading the same in info center too .
Ganesh/mqjess , when you say use html tags for table structure and colors .
Is there a way to assign html tags or color specifications using LocalEnvironment tree . Do you think you can quote simple example . I am like clueless here .
For instance inorder to send font with different quote I know that I canuse this below code snippet .
<font color="red">This is some text!</font>
But how can I use the same in compute node for sending using localEnvironment tree .
Many thanks in advance.
Regards, _________________ -----------
Raju Buddha
Never Wait for your 2nd Opportunity..!Becoz it may be harder than the 1st One...
Last edited by rajbuddha on Fri Oct 09, 2015 10:50 am; edited 1 time in total |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Oct 09, 2015 10:49 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
There isn't an HTML parser in IIB, unless they've added one in v10.
You need to construct your HTML document as a BLOB. _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
ganesh |
Posted: Fri Oct 09, 2015 10:56 am Post subject: |
|
|
Master
Joined: 18 Jul 2010 Posts: 294
|
Create the html document with the table structure and read the html document as BLOB and send the body as a blob. Set the Body content as text/html. |
|
Back to top |
|
 |
Vitor |
Posted: Fri Oct 09, 2015 10:57 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
mqjeff wrote: |
There isn't an HTML parser in IIB, unless they've added one in v10. |
You can (depending on complexity) use the XMLNSC parser to help with this:
Code: |
SET OutputRoot.XMLNSC.Page.font = 'This is some text';
SET OutputRoot.XMLNSC.Page.font.(XMLNSC.Attribute)color = 'red';
|
There's a strong case for just constructing it manually because:
mqjeff wrote: |
You need to construct your HTML document as a BLOB. |
It still needs to be a BLOB once you've built it. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
rajbuddha |
Posted: Fri Oct 09, 2015 11:25 am Post subject: |
|
|
 Apprentice
Joined: 02 Aug 2011 Posts: 47 Location: chennai
|
Thanks a lot Vitor , Ganesh and mqJeff .
I will try the same and update you here . _________________ -----------
Raju Buddha
Never Wait for your 2nd Opportunity..!Becoz it may be harder than the 1st One... |
|
Back to top |
|
 |
rajbuddha |
Posted: Fri Oct 09, 2015 11:57 am Post subject: |
|
|
 Apprentice
Joined: 02 Aug 2011 Posts: 47 Location: chennai
|
Awesome Guys ..
Thanks a lot again , Kudos to you all .
Its working Perfectly , Here is sample code for any other interested users
--------------------------------------------
SET OutputRoot.XMLNSC.Page.html.body.p.font = 'This is red color text';
SET OutputRoot.XMLNSC.Page.html.body.p.font.(XMLNSC.Attribute)color = 'red';
SET OutputRoot.XMLNSC.Page.html.body.p[2].font = 'This is blue color text';
SET OutputRoot.XMLNSC.Page.html.body.p[2].font.(XMLNSC.Attribute)color = 'blue';
SET OutputRoot.XMLNSC.Page.html.body.table.tr[1].td[1] = 'Raj' ;
SET OutputRoot.XMLNSC.Page.html.body.table.tr[1].td[2] = 'Buddha' ;
SET OutputRoot.XMLNSC.Page.html.body.table.(XMLNSC.Attribute)border = '1';
SET OutputRoot.XMLNSC.Page.html.body.table.(XMLNSC.Attribute)style = 'width:50%';
SET OutputRoot.BLOB.BLOB = wholeMsgBlob ;
DECLARE wholeMsgBlob BLOB ASBITSTREAM(OutputRoot.XMLNSC.Page,InputRoot.Properties.Encoding,CCSID );
DECLARE wholeMsgChar CHAR CAST(wholeMsgBlob AS CHAR CCSID CCSID);
SET OutputRoot.BLOB.BLOB = wholeMsgBlob ;
----------------------------------------------------------- _________________ -----------
Raju Buddha
Never Wait for your 2nd Opportunity..!Becoz it may be harder than the 1st One... |
|
Back to top |
|
 |
|