This article will explain how to use the receiver mail adapter to send a payload as an attachment in SAP PI.
There could be several scenarios where we need to use mail with attachments in sap pi. Some of the cases are as follows:
- Sending files over email scenario.
- As an alert – If data in the file is missing send the file to the concerned team for correction and re-trigger.
Let’s consider the alerting example.
Business scenario: If an incoming XML file is missing data, PI must route that file as an attachment and send an email to the appropriate teams for correction.
This can be accomplished through Java mapping, which I believe is a cleaner approach, but for the purposes of this blog, I will use UDFs because not all PI consultants are Java savvy.
The focus of this blog will be on the mail adapter and how to send a payload as an attachment. For more on the mail adapter scenario check the blog SOAP To Mail Scenario in SAP CPI