Author |
Message
|
vasanthi |
Posted: Wed Aug 17, 2005 8:26 am Post subject: sendmail plugin node |
|
|
Apprentice
Joined: 23 Apr 2005 Posts: 42
|
Hi
i am having some problem with the sendmail plugin node.i am getting an xml message.and i want to send this message to as an email using the sendmail plugin node.
my message flow
MQInputNode-->computenode-->sendmailpluginnode
i have set the properties of the send mail pugin node.
my ESQL code in compute node is
SET OutputRoot.MQMD=InputRoot.MQMD;
SET OutputRoot.XML.Message.From='abc@rediffmail.com';
SET OutputRoot.XML.Message.To='abc@yahoo.com';
SET OutputRoot.XML.Message.Subject='message from broker';
SET OutputRoot.XML.Message.Body=InputBody;
after executing this i am able to see the email.i am able to see the subject in my mail but i am not getting my input message in my email.or how can we send this message as an attachment.
regards
vasanthi |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Aug 17, 2005 8:33 am Post subject: Re: sendmail plugin node |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
vasanthi wrote: |
SET OutputRoot.XML.Message.Body=InputBody; |
Does the documentation for this node indicate that the body can contain arbitrary children?
Or does it indicated something different?
Have you considered using the Search feature of this site to see what other questions have been asked about the sendmail node, to see if there is sample code that may be useful? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
vasanthi |
Posted: Wed Aug 17, 2005 9:44 am Post subject: |
|
|
Apprentice
Joined: 23 Apr 2005 Posts: 42
|
thanks jeff
i have gone through the documentation.but nothing is mentioned about the body containing arbitary children.and i also used the search feature but could not get much information about this.
but as i have asked how we can send the file as an attachment.when i refer the document about the attachment it says something like this
<Message>
<From>mqsi@nlrg119</From>
<To>Arjan@nlrg119</To>
<Subject>An e-mail with attachment</Subject>
<Body>See attached file: attachment.xml)</Body>
<EncodingBase64 ContentType="text/plain" Name="attachment.xml"/>
</Message>
The data input for the base64 encoding must be provided in InputRoot.BLOB.BLOB
but i could not understand this. can you give me some idea on this.
regards
vasanthi |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Aug 17, 2005 10:10 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
This is what I know about the sendmail node, and I haven't used it for several years.
It treats the Body element as either a set of Line subchildren, in which case each line is written into the body portion of the email as.. a line ..., or it treats the Body element as containing a single value, which is written into teh body portion of the email as the entire body.
I have not used the Sendmail node to send attachments. But what that comment meant is that there should be both an InputRoot.XML section AND an InputRoot.BLOB.BLOB section in the message tree before the sendmail node. The BLOB.BLOB section should contain a bytestream that is the contents of the attachment. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
rkford11 |
Posted: Wed Aug 17, 2005 7:17 pm Post subject: |
|
|
Partisan
Joined: 06 Jun 2004 Posts: 316
|
You have to encode the attachment to base64 and include that in the CDATA section of the input message. |
|
Back to top |
|
 |
vasanthi |
Posted: Thu Aug 18, 2005 10:40 am Post subject: |
|
|
Apprentice
Joined: 23 Apr 2005 Posts: 42
|
thanks guys
for your immediate responses. i was able to solve the issue. i have searched this site for sendmail plugin where i found one sample code on how to do this. so based upon that i was able to send the e-mail message.
this is similar as rkford11 has said("You have to encode the attachment to base64 and include that in the CDATA section of the input message")
once again thanks guys.
regards
vasanthi |
|
Back to top |
|
 |
saini |
Posted: Sat Aug 20, 2005 7:34 am Post subject: |
|
|
Novice
Joined: 28 Feb 2002 Posts: 24
|
Can you post what you did that made it work so other people can also benefit?
Thanks. |
|
Back to top |
|
 |
jefflowrey |
Posted: Sat Aug 20, 2005 12:08 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
saini wrote: |
Can you post what you did that made it work so other people can also benefit? |
Did you read where vasanthi said "I searched the site, and found sample code"? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
saini |
Posted: Sat Aug 20, 2005 1:41 pm Post subject: |
|
|
Novice
Joined: 28 Feb 2002 Posts: 24
|
No I didn't.
And please quit adding white space to the messages. |
|
Back to top |
|
 |
|