You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2020/10/08 06:52:01 UTC
[camel] 02/02: CAMEL-15484: Update documentation for camel-3.x for
attachments
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
commit cc93289733747048d8a7b5f93d6ff87d710ee3cd
Author: Uday Kiran <ma...@gmail.com>
AuthorDate: Wed Oct 7 17:24:31 2020 -0500
CAMEL-15484: Update documentation for camel-3.x for attachments
---
components/camel-mail/src/main/docs/mail-component.adoc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/components/camel-mail/src/main/docs/mail-component.adoc b/components/camel-mail/src/main/docs/mail-component.adoc
index dec43cf..fe81274 100644
--- a/components/camel-mail/src/main/docs/mail-component.adoc
+++ b/components/camel-mail/src/main/docs/mail-component.adoc
@@ -544,7 +544,8 @@ mail from java code:
---------------------------------------------------------------------------------
public void process(Exchange exchange) throws Exception {
// the API is a bit clunky so we need to loop
- Map<String, DataHandler> attachments = exchange.getIn().getAttachments();
+ AttachmentMessage attachmentMessage = exchange.getMessage(AttachmentMessage.class);
+ Map<String, DataHandler> attachments = attachmentMessage.getAttachments();
if (attachments.size() > 0) {
for (String name : attachments.keySet()) {
DataHandler dh = attachments.get(name);