cancel
Showing results for 
Search instead for 
Did you mean: 

Swapping attachment to content on Receiver Mail Adapter

asoni
Explorer
0 Kudos

Hi Experts,

Can I move my attachment data to content on receiver mail adapter ? I am not using Mail package or mapping. I tried using Payloadswapbean on receiver adapter but adapter generated email with attachment only with and without Payload swap bean module.

Please let me know if it is possible without using Mail Package.

Thanks,

Ankit

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Ankit

Use payload swap bean in the sender communication channel. Once you do that the attachment

will become the payload in SAP PI , then use mail receiver adapter with the option

XIPAYLOAD

Don't check the keep attachment option in mail adapter.

Former Member
0 Kudos

Hi there,

If you want to use attachment in content, then you need to collect the entire mail content in BPM. From there you can use Payloadswap bean on receiver adapter.

The reason behind using BPM is that the attachment is maintained only in Integration Directory. First the mapping converts the source into mail and then just before moving to receiver the attachment gets added to the mail(i.e. after mapping). So if a BPM is used then all the mail content with attachment will get transported to BPM first and then to the receiver with the above change (Payloadswap bean i.e transferring the attachment to content).

Best Regards,

Souvik

iaki_vila
Active Contributor
0 Kudos

Hi Ankit,

I dont know a standard way to do it. If you can't get a direct answer you always can read the attachments in the mapping to copy them to the payload like in this thread is showed Read attachment content in Mapping | SCN

Regards,

asoni
Explorer
0 Kudos

Hi Iñaki,

Thanks, yes that is one of the options but I am looking for an option without mapping.

iaki_vila
Active Contributor
0 Kudos

Hi Ankit,

Could you share your parameters in your Payloadswapbean module?.

Reading the examples, it's possible to do it, as Gabriel pointed ins his blog

Regards.