cancel
Showing results for 
Search instead for 
Did you mean: 

How to keep same sender file name for receiver mail attachement

Former Member
0 Kudos

Hi,

i am working with File to Mail scanario. There i want to pick a flat file from native file system and then send it as email attachment. Now i am able to send the file but the flat is getting converted as an xml file. is there any method to keep the same sender file name and type for receiver mail attachment. i am not using any mail package. i am using XI payload and keep attachments.

Thanks in advance.

-Siva

Accepted Solutions (1)

Accepted Solutions (1)

former_member859847
Active Contributor
0 Kudos

Hi Siva,

The following weblog will give some idea on your query.

/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14

please have a lookt at.

regards

mahesh

Former Member
0 Kudos

Hi Mahesh,

Thanks for the reply. Actually i am not using any mapping. So i don't think the dynamic file name can be apply .

Can we do this with Swap bean Concept ? if then please provide some pointers.

Thanks

-Siva

former_member267355
Active Participant
0 Kudos

Hi,

Refer this blog

https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1685 [original link is broken] [original link is broken] [original link is broken]

Regards,

Sakthi

Former Member
0 Kudos

Hi,

Thanks Sakthi.

Let me know one thing, will it be possible to send a flat file as attachment to a mail recepient? i mean without using mail package and mapping.

Regards,

Siva

former_member267355
Active Participant
0 Kudos

If you see the blog he has done without using mail package and mapping.

I didnt try that but hope it will work.

Regards,

Sakthi

Former Member
0 Kudos

Hi,

Yes,With out using the mail package u can send the Mail Attachments to the receiver side,

In that case no need of Integration Repository objects.

Chck this links.

/people/prasad.ulagappan2/blog/2005/06/07/mail-adapter-scenarios-150-sap-exchange-infrastructure

/people/community.user/blog/2006/09/07/email-reporting

/people/community.user/blog/2006/09/08/email-report-as-attachment-excelword

/people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address

/people/michal.krawczyk2/blog/2005/11/23/xi-html-e-mails-from-the-receiver-mail-adapter

If u dont get ur requirement then let me know ur Mail id i will send u a Doc.

Regards,

Phani

Reward points if Helpful

Former Member
0 Kudos

Thanks Phani,

Yes, i am able to send the file. but the only problem is it is getting converted as .txt to .XML . say my source file is sample.txt and when it received in mail it will become Untitled.xml . There is any way to avoid this without using mapping and mail package?

Please help me

Thanks,

Siva

aashish_sinha
Active Contributor
0 Kudos

Hi,

Since, by default, XI sends payload and attachments in XML format, we need to call two beans, namely the MessageTransformBean and the PayloadSwapBean to help us is transforming the content.

refer this link to solve your problem.

/people/michal.krawczyk2/blog/2005/12/18/xi-sender-mail-adapter--payloadswapbean--step-by-step

Regards

Aashish Sinha

PS : reward points if helpful

Former Member
0 Kudos

Hey Siva,

I exactly got ur point and the solution is that you can do this scenario without using design objects (DT,MT,MI,MM,IM) and directly go ahead and create CC for source and target systems and provide dummy messsage interfaces and namespaces wherever required.

The reason why we are able to do this is because the format of our sender and reciver are same (.txt) so we dont need to convert this inot xml......also it will save a lot of your efforts

PS: Please reward point if it is useful.

Former Member
0 Kudos

Siva, I have tried to do such a scenario once, but I was not successful. As you say, when file is picked up, you want it to send to email exactly as it is. No change of its name, no mapping, nothing.

Well, if you don't use mail package, the file's content is sent correctly, but the file name is changed in the mail adapter.

If you use Mail package, you'll have to do also mapping of the file's content, which is in some cases (images, ...) really problem.

Only way I found out, was creating separate scenario for each file name. Not using mail package, just pick it up and send it as an attachment. In the subject parameter of mail adapter place the file name, the attachment will be re-named like this.

I believe, there is no solution, how to do this in current available SPs. I tried also additional adapter beans - didn't achieved what I needed.

Peter

Former Member
0 Kudos

Thanks Peter.

Experts,

if any one has solved this using any methos please share with us.

Regards,

Siva

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Sivaram,

You can try this.

Message Protocol = “XIPAYLOAD” with “Mail Package”

>>Don't check the "keep attachment" option, you will receive the file as Body & Subject is same as Sender file name.

>>If u check the "Keep atachments" option means you will receive the file as attachment & name will be different.

Look into this BLOG

/people/prasad.ulagappan2/blog/2005/06/07/mail-adapter-scenarios-150-sap-exchange-infrastructure

Regards

Seshagiri

Former Member
0 Kudos

Hi ,

Thanks Seshagiri. Actually i am looking some thing similar to Tunneling in Idoc Scenario. i mean without converting to xml structure can we send the mail to an email recepients?

i am very neew to this XI so please correct me if i am wrong.

Thanks

- Siva