ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Emailoutput Node=> send multiple lines in the body

Post new topic  Reply to topic Goto page 1, 2  Next
 Emailoutput Node=> send multiple lines in the body « View previous topic :: View next topic » 
Author Message
broker_new
PostPosted: Wed May 13, 2009 10:02 am    Post subject: Emailoutput Node=> send multiple lines in the body Reply with quote

Yatiri

Joined: 30 Nov 2006
Posts: 614
Location: Washington DC

Environment:
WMBv6.1, WMQ 6.0.2.6

I would like to send the email with multiple lines in the body.
We were doing as follows in WMBv6.0

SET OutputRoot.XML.Message.Body.Line[1] = 'test1';
SET OutputRoot.XML.Message.Body.Line[2] = 'test2';
SET OutputRoot.XML.Message.Body.Line[3] = 'test1@abcd.com';

Anyone throw some light on doing the same in version 6.1.
_________________
IBM ->Let's build a smarter planet
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed May 13, 2009 10:15 am    Post subject: Re: Emailoutput Node=> send multiple lines in the body Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

broker_new wrote:
Anyone throw some light on doing the same in version 6.1.


Well don't use the XML domain, as more general advice. Use XMLNS or XMLNSC.

What happens when you try this in v6.1? Are you getting errors? Unexpected / unwanted results? SMTP errors?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
rekarm01
PostPosted: Wed May 13, 2009 11:25 am    Post subject: Re: Emailoutput Node=> send multiple lines in the body Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1415

Vitor wrote:
Well don't use the XML domain, as more general advice. Use XMLNS or XMLNSC.

WMB 6.0 Send mail Plug-In (support pack ia07) requires XML; it does not work with XMLNS or XMLNSC.

broker_new wrote:
Anyone throw some light on doing the same in version 6.1.

WMB 6.1 has an EmailOutput node. WMB 6.1 doesn't need the send mail plug-in, (and probably shouldn't use it).

The two nodes are not interchangeable; the surrounding code that generates the output message will require changes.
Back to top
View user's profile Send private message
broker_new
PostPosted: Wed May 13, 2009 12:10 pm    Post subject: Reply with quote

Yatiri

Joined: 30 Nov 2006
Posts: 614
Location: Washington DC

Yes, sendmailplugin supports only XML Domain.

SET OutputRoot.EmailOutputHeader.To = 'wmb@test.com';
SET OutputRoot.EmailOutputHeader.From = 'wmb@test.com';
SET OutputRoot.EmailOutputHeader.Subject = 'Trying to send a email';
SET OutputLocalEnvironment.Destination.Email.BodyContentType = 'text/plain';

SET OutputRoot.XML.Message.Body.Line[1] = 'test1';
SET OutputRoot.XML.Message.Body.Line[2] = 'test2';
SET OutputRoot.XML.Message.Body.Line[3] = 'test1@abcd.com';
Results in email
<Message><Body><Line>test1</Line><Line>test2</Line><Line>test1@abcd.com</Line></Body></Message>

which should be
test1
test2
test1@abcd.com
_________________
IBM ->Let's build a smarter planet
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed May 13, 2009 12:31 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Yes.

Ignore sendmailplugin entirely.

Use EmailOutput node.

Rewrite your code to use that instead.
Back to top
View user's profile Send private message
broker_new
PostPosted: Wed May 13, 2009 12:39 pm    Post subject: Reply with quote

Yatiri

Joined: 30 Nov 2006
Posts: 614
Location: Washington DC

This error which i am referring to is regarding the Emailoutput Node.

When the code is migrated to v6.1, the sendmailplugin is replaced with Emailoutput Node which is causing this problem.
_________________
IBM ->Let's build a smarter planet
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed May 13, 2009 12:54 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Yes.

The EmailOutput node doesn't use the XML structure that the sendmail node used.

It uses the full, serialized contents of OutputRoot, or whatever else you configure it to use.

So don't use XML if you don't want an XML document output.
Back to top
View user's profile Send private message
broker_new
PostPosted: Wed May 13, 2009 1:03 pm    Post subject: Reply with quote

Yatiri

Joined: 30 Nov 2006
Posts: 614
Location: Washington DC

Infocenter talks about populating all the fields except the body.

Root.EmailOutputHeader.To A comma separated list of e-mail addresses.
Root.EmailOutputHeader.Cc A comma separated list of e-mail addresses.
Root.EmailOutputHeader.Bcc A comma separated list of e-mail addresses.
Root.EmailOutputHeader.From A comma separated list of e-mail addresses.
Root.EmailOutputHeader.Reply-To A comma separated list of e-mail addresses.
Root.EmailOutputHeader.Subject The subject of the e-mail.

Could you please post a sample ESQL to populate the body?
_________________
IBM ->Let's build a smarter planet
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed May 13, 2009 1:34 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Set OutputRoot.BLOB.BLOB=
Back to top
View user's profile Send private message
broker_new
PostPosted: Wed May 13, 2009 2:03 pm    Post subject: Reply with quote

Yatiri

Joined: 30 Nov 2006
Posts: 614
Location: Washington DC

Well, I would like to put it this way.

Flow looks like this( Please don't advice me to use XMLNS/XMLNSC parser...tried a lot ..its not working)

MQInput>>>Compute>>>>RCD>>>>>Emailoutput Node

In compute node
SET OutputRoot.EmailOutputHeader.From = InputRoot.XMLNSC.Message.From;
SET OutputRoot.EmailOutputHeader.To = InputRoot.XMLNSC.Message.To;
SET OutputRoot.EmailOutputHeader.Subject= InputRoot.XMLNSC.Message.Subject;

SET OutputRoot.XML.Message.Body.Line[1] = 'test1';
SET OutputRoot.XML.Message.Body.Line[2] = 'test2';
SET OutputRoot.XML.Message.Body.Line[3] = 'test1@abcd.com';

RCD converts into BLOB which is outputting the email as
test1test2test1@abcd.com

which it should output as
test1
test2
test1@abcd.com
_________________
IBM ->Let's build a smarter planet
Back to top
View user's profile Send private message
WMBDEV1
PostPosted: Thu May 14, 2009 1:49 am    Post subject: Reply with quote

Sentinel

Joined: 05 Mar 2009
Posts: 888
Location: UK

broker_new wrote:

SET OutputRoot.XML.Message.Body.Line[1] = 'test1';
SET OutputRoot.XML.Message.Body.Line[2] = 'test2';
SET OutputRoot.XML.Message.Body.Line[3] = 'test1@abcd.com';

RCD converts into BLOB which is outputting the email as
test1test2test1@abcd.com


Based on what Jeff has said I wouldnt have expected that output..... wheres the XML tags?

what happens if you work in the BLOB domain in the compute node (and then remove the RCD) and add carriage returns in between your data elements?
Back to top
View user's profile Send private message
broker_new
PostPosted: Thu May 14, 2009 5:30 am    Post subject: Reply with quote

Yatiri

Joined: 30 Nov 2006
Posts: 614
Location: Washington DC

neither Emailoutput nor sendmailplugin node understands the 'XML format' messages... the body of the email always should be in 'BLOB' format.

My question is how do we format the email to insert the new line in between each text.
_________________
IBM ->Let's build a smarter planet
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu May 14, 2009 5:43 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You write ESQL to insert a line feed, into the BLOB structure.

I can recommend the use of the || operator in this case.

You seem to be going to great lengths to avoid thinking about this. It's extremely straight forward and extremely basic.

If you had spent ten minutes trying to think through this logically, and reading the documentation, you would have solved your own problem yesterday, rather than still be struggling with it today.

Or, for example, if you had started with the Email sample in the Toolkit, you would have had something useful as well.
Back to top
View user's profile Send private message
zpat
PostPosted: Wed May 20, 2009 6:38 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

The Email sample unhelpfully uses Java compute nodes.

Anyone care to post the ESQL to set up an Email in a standard compute node before the Emailoutput node?

When I try it I get a weird error

Quote:
There was an error when the EmailOutput tried to create an e-mail and send it to the SMTP server. The description of the error is: com.ibm.broker.emailnodes.EmailOutputNode : Message passed to the EmailOutput node has a body folder of EmailOutputHeader and owning parser of EMAILHDR. This is not supported by this node
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed May 20, 2009 6:49 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

That means you didn't pass anything in the Body of the message that reached the EmailOutput node.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Emailoutput Node=> send multiple lines in the body
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.