on 2025 May 13 8:10 PM
i have to send email via CAPM for which I have used @SAP-cloud-sdk/mail-client.
The requirement is such that i need to send emails to diffrent recipeints in loop, the scenario is there is a fiori list report in which I select rows and click on Send mail button created as extension custom action for calling below code. this works fine for few emails but throws connection execceded error randomly for more number of rows.
email-handler.js
============
Failed to send emails: Error: Message failed: 432 4.3.2 Concurrent connections limit exceeded. Visit https://aka.ms/concurrent_sending
How to handle concurrent connections. Please help.
Request clarification before answering.
Is your action is configured for parallel execution? There is an 'InvocationGrouping' setting which defines if an action in a list report is executed sequentially (isolated) for each of the selected items, or in parallel (change set). See https://ui5.sap.com/#/topic/cbf16c599f2d4b8796e3702f7d4aae6c
If your invocation setting is set to change set then your function will be executed in parallel so the SDK might be overloaded with requests. Switch to isolated and have a look at the Chrome Network tab to ensure there are sequential singular batch requests sent to your CAP application where the next batch is only sent when the previous one completed (returned 200).
{
$Type : 'UI.DataFieldForAction',
Label : 'Send email',
Action: 'MyService.sendMail',
InvocationGrouping : #Isolated
},
In case you want to send bulk emails, it would be better to use an action defined in an extension instead of a standard Fiori Elements action. In such custom action you will receive a single call in the extension handler with a list of selected rows so you can execute the sendEmail to all receivers at once.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
24 | |
22 | |
8 | |
5 | |
5 | |
4 | |
4 | |
4 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.