Hello Community,
I was using the below code snippet provided by Adobe for getting multiple file attachments and sending an email using Email Service provided by ACS Commons:
https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/forms/adaptive-form...
Map<String, DataSource> attachments = new HashMap<>(); for (Map.Entry<String, RequestParameter[]> param : req.getRequestParameterMap().entrySet()) { RequestParameter rpm = param.getValue()[0]; logger.info("Param: {}", rpm); if(!rpm.isFormField()) { logger.info("Attachment found, content-type: {}", rpm.getContentType()); dataSource = new ByteArrayDataSource(rpm.get(), rpm.getContentType()); logger.info("Attachment: {}", rpm.getFileName()); // Create DataSource Map to attach all required set of files attachments.put(rpm.getFileName(), dataSource); } else { logger.info("No attachment found!"); } } |
NOTE: Multiple attachments option is checked in Adaptive Form.
However, when I upload multiple attachments, I receive only a single document in the email received.
Checked logs - enters the if loop only once even though we upload multiple files.
Any idea what might be wrong?
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Views
Replies
Total Likes
are you on cloud service?
Views
Replies
Total Likes
yes, on Cloud.
Workflow is the only option to send multiple files?
Views
Replies
Total Likes
not necessary to use workflow. The article I sent was for 6.5
Views
Replies
Total Likes