In this post, we will provide a step-by-step guide to mail adapter configuration with attachments. We will cover how to configure the mail server details in the CPI Mail connector and also set up the attachment options.
Outline of this blog series: Step-by-step guide to mail adapter configuration with attachments
- SAP CPI Introduction
- SAP BTP tools and features overview (BTP, Global Account, Sub-Account, Entitlements, Connectivity, Security)
- SAP CPI Web IDE overview
- Registering a trial account and enrolling to SAP CPI service
- Deep dive into Cloud Integration features with real world scenario example
- Use cases of palette functions
- Adapter configurations
- Using Cloud connector for connecting to backend SAP systems
- Overview on API Management & Open Connectors
- Integration using Open Connectors with real world example
In short, below is the content we will elaborate in this tutorial:
- Overview on Mail Adapter
- IFlow Setup
1. Overview on Mail Adapter
SAP CPI (SAP Cloud Stage Incorporation) gives a complete arrangement of devices and capacities for coordinating different frameworks and applications inside an association. One of the vital elements of SAP CPI is its Mail Connector, which permits consistent incorporation with email benefits and empowers the trading of information and connections.
The Mail Connector in SAP CPI goes about as an extension between the joining stage and email frameworks like Microsoft Trade, Gmail, or some other SMTP/POP3-consistent mail server. It gives the capacity to send and get messages, alongside their connections, as a feature of reconciliation situations.
Here are a few vital viewpoints and capacities of the SAP CPI Mail Connector:
Configuration:
The Mail Connector can be effectively arranged inside SAP CPI utilizing the online mix stream manager. Heads can characterize settings, for example, mail server subtleties, validation accreditations, email designs (e.g., plain text or HTML), and connection dealing with choices.
Email Sending:
With the Mail Connector, SAP CPI can send messages from reconciliation streams to outside beneficiaries or interior letter boxes. It upholds different email credits like source, recipient(s), subject, body, and need. Connections can likewise be incorporated by determining the document area or giving the record content straightforwardly inside the coordination stream.
Email Receiving:
The Mail Connector permits SAP CPI to get approaching messages and interaction their items. It upholds the recovery of email credits like shipper, recipient(s), subject, body, and connections. Incorporation streams can be set off in light of the appearance of new messages, empowering computerization and reconciliation with different frameworks.
Attachment Handling:
The Mail Connector works with the treatment of email connections inside SAP CPI. Connections can be extricated from approaching messages and handled by the incorporation stream’s necessities. They can be saved to neighborhood catalogs, changed, or sent to different frameworks on a case by case basis.
Error Handling and Monitoring:
SAP CPI gives hearty blunder taking care of and checking capacities for the Mail Connector. It permits managers to follow the situation with email handling, screen approaching and active messages, and handle special cases or disappointments during mix streams including the Mail Connector.
2. IFlow Setup
The SAP CPI Mail Connector doesn’t uphold demand answer usefulness essentially in light of the nonconcurrent idea of email correspondence.
While utilizing the Mail Connector, the correspondence between the joining stream in SAP CPI and the email server follows a nonconcurrent design. The joining stream can set off the sending of an email or tune in for approaching messages, however it doesn’t keep an immediate, coordinated association with the email server.
Subsequently, use SEND range capability for email situations.
Regarding the mail adapter properties:
Address – SMTP mail address
Proxy type – If its through cloud connector, mention on-premise or else Internet.
Location ID – of cloud connector
Protection – Off / STARTTLS Mandatory/STARTTLS Optional
Authentication – None / Plain Username Password / Encrypted Username Password

Under the processing tab,
From – Email From
To – Email To
Cc/Bcc
Subject – Mail subject. Here we can make reference to dynamic properties/header which can stream at runtime as displayed beneath.
Mail Body – We can pass the approaching payload as mail body like beneath or design a mail body according to prerequisite.
Body-Emulate type – The substance kind of the body segment. On the off chance that its Text/HTML, assuming there are any html components, it would be changed over. If you have any desire to send for all intents and purposes, then pick Message/Plain. There are numerous different choices too. Go ahead and investigate.
Body Encoding – UTF-8

For Mail connections,
SAP has given 2 choices. We can make a connection by passing the header content or the body content.
We can find in the underneath picture, where we are passing the stacktrace header (which we set in past satisfied modifier step, ${exception.stacktrace}). Notice the name of the connection moreover.
Add Message connections – Assuming there are any connections sent by the shipper and the equivalent must be communicated to the recipient, then this choice ought to be empowered.
Content transfer Encoding – Automatic


Overall Setup:



Mail:

By following this step-by-step guide to mail adapter configuration with attachments, we can configure the mail adapter and use it in the IFlow. Thank you for reading this blog. Happy learning!
YOU MAY BE INTERESTED IN
SAP ABAP HANA: Revolutionizing Enterprise Application