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 » SendMail Plugin IA07 - Questions about Email Attachment

Post new topic  Reply to topic Goto page 1, 2  Next
 SendMail Plugin IA07 - Questions about Email Attachment « View previous topic :: View next topic » 
Author Message
ginggo
PostPosted: Mon Mar 02, 2009 12:26 am    Post subject: SendMail Plugin IA07 - Questions about Email Attachment Reply with quote

Novice

Joined: 01 Mar 2009
Posts: 13
Location: Hong Kong

Hi

I am new to SendMail Plugin (IA07). I tried to send email with attachment with this plugin. However, emails could be successfully sent but always without the attachment.

I have configured the outputroot as suggested in the pdf file come with the plugin. What else do I need to configure?

Somebody posted the same question few years ago but there wasn't any definite answer to this.

My ESQL code is as follows:
SET OutputRoot.XML.Message = InputRoot.MRM;
SET OutputRoot.BLOB.BLOB = InputRoot.MRM.EncodingBase64.Data;
SET OutputRoot.XML.Message.EncodingBase64.Data = null;

My input XML is as follows:
<EncodingBase64 ContentType="text/plain" Name="sms.txt" >
<Data>
<![CDATA[PFNNU1JlcXVlc3Q+DQo8QXBwSUQ+QURTPC9BcHBJRD4NCjxNZXNzYWdlPjEyMzQ1Njc4OTA9MTwvTWVzc2FnZT4NCjxNb2JpbGU+ODUyOTY2MDA4NzM8L01vYmlsZT4NCjxUeXBlPmFzY2lpPC9UeXBlPg0KPC9TTVNSZXF1ZXN0Pg==]]>
</Data>
</EncodingBase64>

I have checked in Debug Mode and confirmed that -
1. The ContentType and Name attributes are inside OutputRoot.XML.Message.EncodingBase64

2. OutputRoot.BLOB.BLOB =
PFNNU1JlcXVlc3Q+DQo8QXBwSUQ+QURTPC9BcHBJRD4NCjxNZXNzYWdlPjEyMzQ1Njc4OTA9MTwvTWVzc2FnZT4NCjxNb2JpbGU+ODUyOTY2MDA4NzM8L01vYmlsZT4NCjxUeXBlPmFzY2lpPC9UeXBlPg0KPC9TTVNSZXF1ZXN0Pg==
Back to top
View user's profile Send private message
ginggo
PostPosted: Mon Mar 02, 2009 12:28 am    Post subject: Reply with quote

Novice

Joined: 01 Mar 2009
Posts: 13
Location: Hong Kong

these are the previous replies..
http://www.mqseries.net/phpBB2/viewtopic.php?t=18834
http://www.mqseries.net/phpBB2/viewtopic.php?t=10450

but I couldn't find any workaround on my problem.
Back to top
View user's profile Send private message
MQEnthu
PostPosted: Mon Mar 02, 2009 12:34 am    Post subject: Reply with quote

Partisan

Joined: 06 Oct 2008
Posts: 329
Location: India

What is the version of WMB...if it is V6.1 EmailOutput node would be the better choice..
_________________
-----------------------------------------------
It is good to remember the past,
but don't let past capture your future
Back to top
View user's profile Send private message
ginggo
PostPosted: Mon Mar 02, 2009 12:36 am    Post subject: Reply with quote

Novice

Joined: 01 Mar 2009
Posts: 13
Location: Hong Kong

we are using ver6.0

any workaround for 6.0?
Back to top
View user's profile Send private message
ginggo
PostPosted: Mon Mar 02, 2009 12:38 am    Post subject: Reply with quote

Novice

Joined: 01 Mar 2009
Posts: 13
Location: Hong Kong

thanks MQEnthu!
is EmailOutput Node available for 6.0 as well?
Back to top
View user's profile Send private message
MQEnthu
PostPosted: Mon Mar 02, 2009 12:59 am    Post subject: Reply with quote

Partisan

Joined: 06 Oct 2008
Posts: 329
Location: India

ginggo wrote:
is EmailOutput Node available for 6.0 as well?


No ... it is one of the new nodes introduced in V6.1...
_________________
-----------------------------------------------
It is good to remember the past,
but don't let past capture your future
Back to top
View user's profile Send private message
ginggo
PostPosted: Mon Mar 02, 2009 1:47 am    Post subject: Reply with quote

Novice

Joined: 01 Mar 2009
Posts: 13
Location: Hong Kong

thanks...
i could try to update it to 6.1

but anyone here using 6.0 with SendMail plugin?
Back to top
View user's profile Send private message
ginggo
PostPosted: Tue Mar 03, 2009 8:35 pm    Post subject: Reply with quote

Novice

Joined: 01 Mar 2009
Posts: 13
Location: Hong Kong

I tried to update it to 6.1 and EmailOutputNode
I saw the exception saying "no smtp server found"
but i have set the smtp server in the property page of EmailOutputNode

any idea?
Back to top
View user's profile Send private message
smdavies99
PostPosted: Tue Mar 03, 2009 11:23 pm    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Have your tried the sample flow that comes with V6.1?
Follow the instructiuons to the letter and you (provided the SMTP Server will allow your connection) get it to work.

I recently had to get the V6.1 nodes working in a customer. There was a catche 22 situation in that they wouldn't let me connect to it unless I could show it working but I couln't connect to demonstrate it. So I downloaded a trial version of Axigen and set that up in a VM. I could demonstrate the connectivity & operation of the Email output. Then once the customer IT dept gave the go ahead, I switched the flow to use the proper one and it works as advertised.

Perhaps you can try this method for yourself. Remember to follow the instructions in the sample to setup your broker and you shouldn't go far wrong.

Finally, if you have problems with your own flow DON'T use the debugger. Add some trace nodes before the emailOutput node. Get a user trace output of ${Root} & ${LocalEnvironment}. Put some trace nodes in the sample flow and see what works and adjust your flow to make it do the same.
_________________
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.
Back to top
View user's profile Send private message
ginggo
PostPosted: Wed Mar 04, 2009 6:49 pm    Post subject: Reply with quote

Novice

Joined: 01 Mar 2009
Posts: 13
Location: Hong Kong

i m really new to message broker ...
i find it quite confused with attachments
the input message is a xml.
the file is already encoded with base64 and it is stored in
InputRoot.MRM.Data

how to make the EmailOutput Node convert it back to a correct file attachment?

i tired this

SET OutputLocalEnvironment.Destination.Email.Attachment.Content = CAST(InputRoot.MRM.Data as BLOB CCSID 1208);

SET OutputLocalEnvironment.Destination.Email.Attachment.ContentName = 'abc.gif';

SET OutputLocalEnvironment.Destination.Email.Attachment.ContentType = 'application/octet-stream';

SET OutputLocalEnvironment.Destination.Email.Attachment.ContentEncoding = 'base64';

the attachment appears in the email i received
but it doesn't seem to be a correct file...i couldn't open it successfully with image browser

how should i change this line?
SET OutputLocalEnvironment.Destination.Email.Attachment.Content = CAST(InputRoot.MRM.Data as BLOB CCSID 1208);
Back to top
View user's profile Send private message
MQEnthu
PostPosted: Wed Mar 04, 2009 8:45 pm    Post subject: Reply with quote

Partisan

Joined: 06 Oct 2008
Posts: 329
Location: India

Is not the the attachment contains normal ASCII text? If yes, use 7bit
Destination.Email.Attachment.ContentEncoding..
_________________
-----------------------------------------------
It is good to remember the past,
but don't let past capture your future
Back to top
View user's profile Send private message
ginggo
PostPosted: Wed Mar 04, 2009 10:46 pm    Post subject: Reply with quote

Novice

Joined: 01 Mar 2009
Posts: 13
Location: Hong Kong

it's a binary file.
i m trying to attach a gif file

do you mean that i should encode the gif file with 7bit first and store inside InputRoot.MRM.Data?

like this?
SET OutputLocalEnvironment.Destination.Email.Attachment.Content = CAST(InputRoot.MRM.Data as BLOB CCSID 1208);

SET OutputLocalEnvironment.Destination.Email.Attachment[1].ContentEncoding = '7bit';
Back to top
View user's profile Send private message
MQEnthu
PostPosted: Wed Mar 04, 2009 11:12 pm    Post subject: Reply with quote

Partisan

Joined: 06 Oct 2008
Posts: 329
Location: India

ginggo wrote:
it's a binary file.
i m trying to attach a gif file


You were correct..base64 is the encoding you should use for binary files.
_________________
-----------------------------------------------
It is good to remember the past,
but don't let past capture your future
Back to top
View user's profile Send private message
ginggo
PostPosted: Thu Mar 05, 2009 12:35 am    Post subject: Reply with quote

Novice

Joined: 01 Mar 2009
Posts: 13
Location: Hong Kong

thanks
but the attachment i found in the received email is not correct..

here is what i hv done
1. use some other converter to convert the gif to base64
2. the string (InputRoot.MRM.Data) is passed to the compute node
3. SET OutputLocalEnvironment.Destination.Email.Attachment.Content = CAST(InputRoot.MRM.Data as BLOB CCSID 1208);
4. EmailOutput node.

then i got the email
however, the attached file is still the string encoded with base64

i supposed the EmailOutput node would convert it back to a correct file?
i wonder if my steps are correct.
Back to top
View user's profile Send private message
ginggo
PostPosted: Thu Mar 05, 2009 1:37 am    Post subject: Reply with quote

Novice

Joined: 01 Mar 2009
Posts: 13
Location: Hong Kong

at last i tried to do it this way and the attachments work fine now!
SET OutputLocalEnvironment.Destination.Email.Attachment[1].Content = base64Decode(InputRoot.MRM.Data);

CREATE PROCEDURE base64Decode(IN source CHAR)
RETURNS BLOB
LANGUAGE JAVA
EXTERNAL NAME "com.ibm.broker.javacompute.Base64.decode";

but have to call the built-in java function

thanks everyone again!
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 » SendMail Plugin IA07 - Questions about Email Attachment
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.