cancel
Showing results for 
Search instead for 
Did you mean: 

Process attachments with sender email adapter

Former Member
0 Kudos

Hi @ all,

I have some problems dealing with xml attachments on emails. I configured the email sender adapter by using Michals Blog

<a href="/people/michal.krawczyk2/blog/2005/12/18/xi-sender-mail-adapter--payloadswapbean--step-by-step:///people/michal.krawczyk2/blog/2005/12/18/xi-sender-mail-adapter--payloadswapbean--step-by-step

Unfortunately the mail header looks different as the one in the blog:

<b>Content-ID: <payload-0db7d41440e211dc89b8001185eb2336@sap.com>

Content-Type: application/octet-stream;name="payload-485025582FE6584FA25FBF8F540E7D46@sap.com.xml"

Content-Disposition: attachment;filename="MailAttachment-1.bin"

Content-Description: MailAttachment-1</b>

What can I do to make it look like in the blog?

thanks and Regards.

Oliver.

Accepted Solutions (1)

Accepted Solutions (1)

stefan_grube
Active Contributor
0 Kudos

As your SMTP header looks like an email coming from the mail adapter, are you really talking about sender adapter? Du you send an email from XI to XI?

As swap.keyname you could use Content-Disposition and as swap.keyvalue you could use MailAttachment (any substring of the value in the header)

Regards

Stefan

Former Member
0 Kudos

Hmm, yes I think our partner which is sending the emails has an XI, as well.

No matter, now the attached file (IDOC) was transferred properly to my R/3. I had to change the receiver agreement from IDOC to the mail format. But this yields my next problem. How does the mapping has to look like? I cannot map the mail format to IDOC. Or do I have to create my own message type where mail header and IDOC are included?

Regards.

Oliver.

Former Member
0 Kudos

Hi

Possibly what you are thinking is correct.I dont see a way out.In your case i feel perhaps you require Message Maaping also.

Thanks

stefan_grube
Active Contributor
0 Kudos

As you receive an IDOC XML as email attachment, is there any need to use mail package?

If you could avoid mail package then there would not be any need for mapping.

Regards

Stefan

Former Member
0 Kudos

I don't use mail package. I guess you are right in this case. But what if the partner sends no IDOC but an unknown external format? In this case I will have to use a mapping, don't I?

Regards.

Oliver.

stefan_grube
Active Contributor
0 Kudos

If the partner sends an ownknown format or you request a spam mail, you reject or resend the mail. Build a receiver determination based on the field IDOC to ensure that you have received an IDOC format, otherwise send the message to an alternative receiver.

The point is: If the format is unkonown, there is no mapping you could do.

Regards

Stefan

Former Member
0 Kudos

That's perfect. Thanks for your help.

Answers (5)

Answers (5)

vikas_agarwal
Contributor
0 Kudos

Hi,

As in yr case the content-Dispostion is in .bin

<i>

Content-Disposition: attachment;filename="Content-Disposition: attachment;filename="MailAttachment-1.bin""</i>

So use keyvalue - "MailAttachment-1.bin"

Regards

Vikas

Former Member
0 Kudos

Hi ,

Also See These

/people/stefan.grube/blog/2007/04/17/xi-mail-adapter-an-approach-for-sending-emails-with-attachment-with-help-of-java-mapping

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

Regards

Khanna

Former Member
0 Kudos

Hi

Can you please recheck if you have given the same parameters as specified in the blog.I have done this scenario.Initially we also faced some problems, then later it worked.

Let us know more about your case.

Thanks

Former Member
0 Kudos

Hi

In the keyvalue field , place the filename in codes like this " " and dont forget to put .xml.

Try this out.

Thanks

Former Member
0 Kudos

Hi,

Try With the Following Blogs

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

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

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

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

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

http://help.sap.com/saphelp_nw04/helpdata/en/3c/b4a6490a08cd41a8c91759c3d2f401/content.htm

Reward Points if Helpful

Regards

Khanna

MichalKrawczyk
Active Contributor
0 Kudos

hi,

you need to use Michal's help hehe:)

did you use .xml in keyvalue as shown ?

Regards,

michal

-


<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

Former Member
0 Kudos

Hi,

I did everything exactly as in the blog. I put .xml and quoted it by " ". The only mistake I found was that the new module was not at first position. I switched this and tried again but the message header looks still the same.

I guess the problem is that the content-type is not text/xml but application/octet-stream instead. So the module cannot work properly.

Regards.

Oliver.

Former Member
0 Kudos

Hi

Check whether the sequence of modules is same as given.

Next try out with Best Effort in QOS..This was the trick which we used.

Thanks