cancel
Showing results for 
Search instead for 
Did you mean: 

mail attachment (.csv) to File (.csv)

Former Member
0 Kudos

Hi mates,

I have a requirement where I have to pick the attachment(.csv format) of an incoming mail and store this file ( in .csv format)onto a file server using a reciever file adapter.

Please suggest how can i go about it ?

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Thanks.

Former Member
0 Kudos

HI Friends,

This is a very urgent requirement....please help.

Former Member
0 Kudos

>>This is a very urgent requirement....

Please read the Rules of engagement. Using the word urgent will not help you in any means.

You have to use standard module "Payload swap bean" to bring the contents of attachment to payload coz. File receiver adapter can not process attachments.

Regards,

Jai Shankar

Former Member
0 Kudos

I understand that by saying that its not going to help but it can bring my question up in the queue

Jai, I have already done that and used payloadswapbean in my sender mail adapter to swap the original payload with the attachment.

What i wanted to know is that whether I can do this scneario without creating design objects also ?

Former Member
0 Kudos

Hi Snehal,

If you dont intend to do any changes the payload, then you can go ahead without creating IR objects. The output file will be exactly similar to the attachment you have.

P.S: Using the word ugent is considered rude by many the forums. Hence suggested you to refrain from doing that.

Regards,

Jai Shankar

Former Member
0 Kudos

Thanks Jai for your reply.

I have configured the scenario as u suggested (w/o design objects) but I am getting this error in CC monitoring of file reciever:

Could not process due to error: sun.io.MalformedInputException

Also, I would like to know if I need to use FCC at the reciever side. if yes then what could be the structure.

My mail attachment looks like this (obviously in csv, these fields would be comma seperated):

Lead code:12929

Order ref: sp/jaksd/1212

order type: S

Item code Qty

1221231 123

1212232 78

........... ...

end

Please help.

Former Member
0 Kudos

Sorry guys .......but Jst to bring it up !!

Former Member
0 Kudos

>>Also, I would like to know if I need to use FCC at the reciever side. if yes then what could be the structure.

No. You should be using the File protocol.

I have not tried working with attachments in FIle reciver adapter. May be that is also a reason.

Regards,

Jai Shankar

Former Member
0 Kudos

When i am sending a .txt file then the scneario is working fine but when the .csv file is dent it throws this error:

Could not process due to error: sun.io.MalformedInputException

Edited by: Snehal R Patil on Jan 16, 2008 12:16 PM

Former Member
0 Kudos

My sender mail adpater is workinmg fine and I think the problem is with file reciever. Any inputs ?

Former Member
0 Kudos

Try using the Transfer mode "Binary" in File receiver communication channel.

Regards,

Jai Shankar

Former Member
0 Kudos

Jai,

After changing the transfer mode from text to Binary.

The XI system is creating a file but the data inside that file is junk. For e.g :

" "$"#,##0.00_);[Red]("$"#,##0.00) 7 * 2 ("$"* #,##0);_("$"* (#,##0);_("$"* "-"_);_(@_) . ) ) (* #,##0);_(* (#,##0);_(* "-"_);_(@_) ? , : ("$"* #,##0.00);_("$"* (#,##0.00);_("$"* "-"??_);_(@_) 6 + 1 (* #,##0.00);_(* (#,##0.00);_(* "-"??_);_(@_)à õÿ À à õÿ ô À à õÿ ô À à õÿ ô À à õÿ ô À à õÿ ô À à õÿ ô À à õÿ ô À à õÿ ô À à õÿ ô À à õÿ ô À à õÿ ô À à

This looks like when you open a CSV file in a notepad.

Please help how can i format this data so that it lokks like normal comma seperated form.

Former Member
0 Kudos

I know i am very close to the solution and missing 1 point ...please help

Former Member
0 Kudos

Jai,

Its working fine now but when i am sending a .xls file, the file being generated is in junk form. Is it possible to make my system, which can accept both .csv and .xls files and create a meaningful file.

Former Member
0 Kudos

>Its working fine now

Good. But what else you needed to change in the configuration? You are able to process .txt and csv files sucessfully now?

AFAIK, it is not possible to extract values directly from xls files. You need Conversion agent to do this.

Regards,

Jai Shankar

Former Member
0 Kudos

Thanks Jai for following up on this thread.

Yes, my initial requirement was to read txt and csv files but now i want to read .xls files also...can u suggest how can i do that. As u just mentioned, I have to use conversion agaent...can u help me with some info/blogs.

Former Member
0 Kudos

In a previous scneaio, I have worked on a simlar scenario but there my attachent was in txt format and the target file format was also .txt . Then, I got an advice from fellow SDN'ers to go without the creation of design objects(DT,MT, MI,MM,IM) and give somy dummy values for MI and interface namespace in configurations objects. Can i use that methodology here.

Please help ....prompt and precise replies would be very helpful and highly rewarded .