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 » Reading mail attachment's filename.

Post new topic  Reply to topic
 Reading mail attachment's filename. « View previous topic :: View next topic » 
Author Message
grasher134
PostPosted: Mon Dec 22, 2014 12:31 am    Post subject: Reading mail attachment's filename. Reply with quote

Acolyte

Joined: 22 Oct 2014
Posts: 62

Hello.

I have a simple message flow EmailInput - Compute - FileOutput.

It works, but I have difficulties with extracting full filename from attachment. I do it like this now:

Code:
InputRoot.MIME.Parts.Part[2]."Content-Type"


But then I have to parse it like text

Code:

SET posbegin = POSITION('name' IN Contents);
SET posbegin = posbegin + 5;
SET FileName = SUBSTRING(Contents FROM posbegin FOR 7);


I know it is a very bad idea, but I have not found any other field, except of "Content-Type", that contains filename.

I sense, that it's a very trivial question. But I'm stuck with it

P.S. I heard there was some way to see the whole tree coming through such nodes as FileInput or EmailInput, but I didn't find it.
Back to top
View user's profile Send private message
Simbu
PostPosted: Mon Dec 22, 2014 12:54 am    Post subject: Reply with quote

Master

Joined: 17 Jun 2011
Posts: 289
Location: Tamil Nadu, India

Hi,

The field Content-Disposition will have the filename of the attachment but still you need to use String function.

Quote:
Content-Disposition: attachment;filename="test.txt"
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Dec 22, 2014 6:37 am    Post subject: Re: Reading mail attachment's filename. Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

grasher134 wrote:
P.S. I heard there was some way to see the whole tree coming through such nodes as FileInput or EmailInput, but I didn't find it


This is the Trace node. Wire one in after the EmailInput, configure a destination for it to write to, and then specify a pattern of ${Root}
Back to top
View user's profile Send private message
grasher134
PostPosted: Wed Dec 24, 2014 5:51 am    Post subject: Reply with quote

Acolyte

Joined: 22 Oct 2014
Posts: 62

Thank you all for your help.

So the only way - is to parse text. And it doesn't suit me, because different mail servers can write it in different ways. This error caused me to look for another decision.

About Trace node.. I tried it, wanted to write to file, but it didn't do anything.
It was like EMailInput - TraceNode - ComputeNode - ...

Is there any sample, where I can look at it?
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 » Reading mail attachment's filename.
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.