Skip to Content
avatar image
Former Member

Swapping attachment to content on Receiver Mail Adapter

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Apr 21, 2014 at 06:58 AM

    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,

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 21, 2014 at 07:40 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 21, 2014 at 09:04 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded