Posted: Fri Jun 20, 2008 6:07 am Post subject: Problem in EmailOutput node while sending attachment
Acolyte
Joined: 11 Dec 2007 Posts: 61 Location: Bengaluru
Hi,
I am using WMB version 6.1 on windows platform.
The flow devloped has the following outline :
MQInput -> Compute -> EmailOutput
The email message test is working fine but the attachment is not working as desired.
Below are the contents of the ESQL file:
SET OutputRoot.EmailOutputHeader.To = 'abc@domain.com';
SET OutputRoot.EmailOutputHeader.From = 'abc@domain.com';
SET OutputRoot.EmailOutputHeader.Subject = 'Trying to send a attachment file';
SET OutputRoot.XML.Email.Body = 'Error message';
SET OutputLocalEnvironment.Email.SMPTServer = 'smtpserver';
SET OutputLocalEnvironment.Email.BodyContentType = 'text/html';
SET OutputLocalEnvironment.Email.Attachment.Content = BITSTREAM(InputRoot.MRM);
SET OutputLocalEnvironment.Email.Attachment.ContentType = 'text/plain';
SET OutputLocalEnvironment.Email.Attachment.ContentName = 'attachment.txt';
SET OutputLocalEnvironment.Email.Attachment.ContentEncoding = 'base64';
SET OutputRoot.BLOB.BLOB = BITSTREAM(OutputRoot.XML.Email.Body);
Can you please let me know on what could have gone wrong.
Posted: Sun Jun 22, 2008 2:01 am Post subject: let me see
Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
You have an incorrect OutputRoot structure.
SET OutputRoot.XML.Email.Body = 'Error Message';
then you have.
SET OutputRoot.BLOB.BLOB = BITSTREAM(OutputRoot.XML.Email.Body);
Firstly, DON'T USE BITSTREAM as it is depreciated. Use ASBITSREAM instead
Then you don't need the OutputRoot.XML folder.
my tip ( and how I got this to work myself) is to import the sample flow and with judicious use of trace nodes, I was able to see the structure of the Root folders and their contents that worked. Then I code my ESQL to get the same results.
/steve _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
SET OutputLocalEnvironment.Email.BodyContentType = 'text/plain';
SET OutputLocalEnvironment.Email.Attachment.Content =InputRoot.BLOB.BLOB;
SET OutputLocalEnvironment.Email.Attachment.ContentType = 'text/plain';
SET OutputLocalEnvironment.Email.Attachment.ContentName = 'attachment.txt';
SET OutputLocalEnvironment.Email.Attachment.ContentEncoding = 'base64';
SET OutputRoot.BLOB.BLOB = CAST(mailMsg as BLOB CCSID 1208);
I am still not able to receive the attachment. _________________ Regards
Vinay
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum