cancel
Showing results for 
Search instead for 
Did you mean: 

Save attachment in email to file scenario

AntonioSanz
Active Participant
0 Kudos

Hi all, I am working on a email (with 1 attachment) to file escenario.

I have read michaels blog

http://scn.sap.com/people/michal.krawczyk2/blog/2005/12/18/xi-sender-mail-adapter--payloadswapbean--...

in order to configure my system for getting the attachments.

Now the attachments are comming to my system. But I have a doubt, because my attachment is in txt format and I just want to save it. I have read in other blogs but the process is not clear for me.

In the payload I have a MailMessage and MailAttachment-1. I can do a mapping from MailMessage to my interface, but i have no idea about how to map MailAttachment-1 into my interface. Is that possible? How can I handle that informatio in order to save the attachment into a file system?

Thanks.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Antonio, did you get this working as you had hoped?

AntonioSanz
Active Participant
0 Kudos

Yes I has been working as I expected.

1.- I have used mail sender Adapter:  Use Mail Package & Keep Attachment checked

2.- I have created a message mapping + UDF to get the name of the attachment and data of the attachment (Mail to a Custom Message). This data I have mapped on a field (on n fields if many attachment) of my target message.

Kind Regards.

AntonioSanz
Active Participant
0 Kudos

Yes I could get the attachment from my email box.

Thanks for your interest

Former Member
0 Kudos

I've got mine working now also. By the way, can you mark your thread with the correct answer as you outlined above? This is a good habit, even when you answer your own questions 😄