Mi Jane, You could consider writing your own custom: MiJaneEmailEndpoint extends DefaultEndpoint MiJaneEmailComponent extends DefaultComponent MiJaneEmailPollConsumer extends ScheduledPollConsumer
This is as we have done and we can receive attachments from Microsoft Exchange. Camel version 3.7.2 Alex Mattern -----Original Message----- From: Mi Jane 米静 <jane...@universalbeijing.com> Sent: Tuesday, September 6, 2022 1:28 AM To: users@camel.apache.org Subject: [EXTERNAL SENDER:] RE: Poll enrich with mail component will lose attachments Hi Claus, I tested Camel 3.18.0 with Quarkus 2.11.0. The result is the same: I got the mail message but no attachment. Regards, Jane -----Original Message----- From: Claus Ibsen <claus.ib...@gmail.com> Sent: Friday, September 2, 2022 1:51 PM To: users@camel.apache.org Subject: Re: Poll enrich with mail component will lose attachments Hi Can you try testing with 3.18.x On Wed, Aug 31, 2022 at 12:41 PM Mi Jane 米静 <jane...@universalbeijing.com> wrote: > Dear community, > > When I used Camel 3.11, poll enrich with mail component worked well > and I could get the mail attachments. > When I changed to Camel 3.16 for other reasons, I could get the mail > but I couldn’t get the attachments. > > Here is an example: > > …… > > .pollEnrich("imaps://{{mail.server}}?session=#oAuthSession&closeFolder > =false&unseen=true&peek=true&folderName={{mail.sub.folder}}") > .process(new Processor() { > @Override > public void process(Exchange exchange) throws Exception { > AttachmentMessage attachmentMessage = > exchange.getMessage(AttachmentMessage.class); > Map<String, DataHandler> attachments = > attachmentMessage.getAttachments(); > if (attachments != null) { > LOGGER.info("attachments: > {}", attachments.size()); > } else { > LOGGER.info("no > attachment"); > } > } > }) > …… > > With Camel 3.11 I got log “attachments: 1”, while with Camel 3.16 I > got log “no attachment”. > Is it a known issue for Camel 3.16, or is there any extra parameter I > missed? Thanks in advance! > > Regards, > Jane > > -- Claus Ibsen ----------------- https://urldefense.com/v3/__http://davsclaus.com__;!!KV6Wb-o!8Yd-C1AxawtkFQ2Caaw1Osv8YfGqq80fe34VX3VG0JcFyt_87Y4X_eLPWreVCz1HppafhKrKY2dtNypxSRC9hqcf$ @davsclaus Camel in Action 2: https://urldefense.com/v3/__https://www.manning.com/ibsen2__;!!KV6Wb-o!8Yd-C1AxawtkFQ2Caaw1Osv8YfGqq80fe34VX3VG0JcFyt_87Y4X_eLPWreVCz1HppafhKrKY2dtNypxSYVDXpOl$ *************************** IMPORTANT NOTE***************************** The opinions expressed in this message and/or any attachments are those of the author and not necessarily those of Brown Brothers Harriman & Co., its subsidiaries and affiliates ("BBH"). There is no guarantee that this message is either private or confidential, and it may have been altered by unauthorized sources without your or our knowledge. Nothing in the message is capable or intended to create any legally binding obligations on either party and it is not intended to provide legal advice. BBH accepts no responsibility for loss or damage from its use, including damage from virus. ******************************************************************************