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 » MB 6.1 Email Node

Post new topic  Reply to topic
 MB 6.1 Email Node « View previous topic :: View next topic » 
Author Message
biswagourab
PostPosted: Tue Apr 15, 2008 7:42 am    Post subject: MB 6.1 Email Node Reply with quote

Apprentice

Joined: 31 May 2005
Posts: 47
Location: London

Hi
I have a flow which has 3 nodes.
MQInput --> Compute --> EmailOutput

I was curious if we can set the body of the email in the compute node. I am able to set the Header of the email and the SMTP server values, but somehow am not able to do the same for the email body.

I did see the sample that came along with the package, and it implements Java, and does infact build the email body in the Compute node itself.

But I wanted to do that using ESQL.

The IBM help says "If you do not specify a value for the MessageText property, the text of the e-mail is the body of the message tree that is passed to the EmailOutput node"

But I am not able to understand 'body of the message tree'

Can anyone please help me on this.

Thanks
Biswa
_________________
_________________
Biswa Gourab Malla
IBM Certified System Administrator - WebSphere MQ, v6.0
IBM Certified System Administrator - Websphere Message Broker v6.0
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
jefflowrey
PostPosted: Tue Apr 15, 2008 7:48 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

The Body of the Message Tree is "OutputBody". Which is to say "the last child of OutputRoot".

I.e. - whatever your message tree has.

So if you build OutputRoot.XMLNSC with a valid XML document, and pass that to EmailOutput node, then the body of the email message will be the XML document. Likewise with a TDS document or SOAP or other domain.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
broker_new
PostPosted: Tue Apr 15, 2008 8:15 am    Post subject: Reply with quote

Yatiri

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

Try this it worked for me in WMB 6.0.3.

SET OutputRoot.XMLNSC.Message.From = 'abcd@abcd.com';
SET OutputRoot.XMLNSC.Message.To = 'abcd@abcd.com'';
SET OutputRoot.XMLNSC.Message.Subject = 'Hi';
SET OutputRoot.XMLNSC.Message.Body = 'Test Mail to test the SendMailPlugIn Node functionality';
_________________
IBM ->Let's build a smarter planet
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Apr 15, 2008 8:20 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

broker_new wrote:
Try this it worked for me in WMB 6.0.3.


Which of course uses the sendmail plugin node SupportPac.

Which is entirely unrelated to the EmailOutput node in v6.1.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
broker_new
PostPosted: Tue Apr 15, 2008 8:27 am    Post subject: Reply with quote

Yatiri

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

oops I had mistaken i thought EmailOutputNode is SendMailPluginNode.
I didn't know that there is such node.
I have to look at 6.1 documentation to understand the new features.
_________________
IBM ->Let's build a smarter planet
Back to top
View user's profile Send private message
biswagourab
PostPosted: Tue Apr 15, 2008 3:56 pm    Post subject: Reply with quote

Apprentice

Joined: 31 May 2005
Posts: 47
Location: London

Thanks jefflowrey

I did as you suggested, and set the 'OutputBody' as
SET OutputRoot.XML.Email.MessageText = InputRoot.XML.Envelope.Body.Message;

And it did capture the data, and send out an email. but not in the format that I was expecting. It looked like this
<Email><MessageText>Test Message</MessageText></Email>

Then I set the 'Body Content Type' of the EmailOutput node from 'Text/Plain' to 'Text/HTML' and then it came out fine.

Thanks for the help
Biswa
_________________
_________________
Biswa Gourab Malla
IBM Certified System Administrator - WebSphere MQ, v6.0
IBM Certified System Administrator - Websphere Message Broker v6.0
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
murdeep
PostPosted: Thu May 15, 2008 6:58 am    Post subject: Reply with quote

Master

Joined: 03 Nov 2004
Posts: 211

I'm in the process of converting our flows that use sendmail to use the emailoutput node.

I have a question on how to handle newlines in the body of the email. Sendmail had the concept of lines within the email boody. I am trying to do this in the emailoutput node but all of my email content appears as a single line.

Can someone enlighten me on how to get two or more lines within the email body? I've tried adding CRLF chars but they appear to be ignored.
Back to top
View user's profile Send private message
murdeep
PostPosted: Thu May 15, 2008 3:27 pm    Post subject: Reply with quote

Master

Joined: 03 Nov 2004
Posts: 211

Ok, since the email body is actually html I though I would construct an html doc and see what happens and sure enough it worked. For example here is the sample ESQL I used:

Code:
      SET OutputRoot.EmailOutputHeader.Subject = 'This email is from broker ' || BrokerName;
      SET OutputLocalEnvironment.Destination.Email.BodyContentType = 'text/html';
      SET OutputRoot.XMLNSC.Email.H2 = 'Heading in the body';
      SET OutputRoot.XMLNSC.Email.BR[1] = 'Some text in the body';
      SET OutputRoot.XMLNSC.Email.BR[2] = 'Some more text in the body';
Back to top
View user's profile Send private message
Gemz
PostPosted: Fri May 16, 2008 12:51 am    Post subject: Reply with quote

Centurion

Joined: 14 Jan 2008
Posts: 124

You can pass the entire email message as a character to email node.

Its something like

Code:
SET OutputRoot.XMLNSC.MailMsg = '
Admin,
blah blah blah
Flow Name : '||Environment.Variables.FLOWID||'.
Unique Id : '||Environment.Variables.uniqueID||'.
Error Text : '||Environment.Variables.ErrorText;


In this we are sending the message as an xml with single element.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » MB 6.1 Email Node
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.