Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
2.24.0
-
None
-
None
-
Unknown
Description
I have such route (taken from documentation):
@Override public void configure() throws Exception { from("imaps://login@host:993?password=pass&debugMode=true") .process(new Processor() { @Override public void process(final Exchange exchange) throws Exception { final Message in = exchange.getIn(); Map<String, DataHandler> attachments = in.getAttachments(); System.out.println("ATTACHMENTS: "+attachments.size()); } }); }
When I sent email with images.jpg attachment, email is read, but attachment Map is empty.
Debug shows:
DEBUG: setDebug: JavaMail version 1.6.1 DEBUG: getProvider() returning javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Oracle,1.6.1] DEBUG IMAPS: mail.imap.fetchsize: 16384 DEBUG IMAPS: mail.imap.ignorebodystructuresize: false DEBUG IMAPS: mail.imap.statuscachetimeout: 1000 DEBUG IMAPS: mail.imap.appendbuffersize: -1 DEBUG IMAPS: mail.imap.minidletime: 10 DEBUG IMAPS: closeFoldersOnStoreFailure DEBUG IMAPS: trying to connect to host "XXXXXX.com", port 993, isSSL true * OK IMAP4 ready A0 CAPABILITY * CAPABILITY IMAP4rev1 UIDPLUS LITERAL+ CHILDREN NAMESPACE XLIST IDLE MOVE XAOL-MOVE AUTH=PLAIN A0 OK completed DEBUG IMAPS: AUTH: PLAIN DEBUG IMAPS: protocolConnect login, host=XXXXXX.com, user=XXXXXXX, password=<non-null> DEBUG IMAPS: AUTHENTICATE PLAIN command trace suppressed DEBUG IMAPS: AUTHENTICATE PLAIN command result: A1 OK Login completed A2 CAPABILITY * CAPABILITY IMAP4rev1 UIDPLUS LITERAL+ CHILDREN NAMESPACE XLIST ID IDLE MOVE XAOL-MOVE A2 OK CAPABILITY completed A3 LIST "" INBOX * LIST (\Noinferiors) "/" "INBOX" A3 OK List completed DEBUG IMAPS: connection available -- size: 1 A4 SELECT INBOX * 13 EXISTS * 0 RECENT * OK [UNSEEN 13] UIDs valid * OK [UIDVALIDITY 1549376878] UIDs valid * OK [UIDNEXT 36] Predicted next UID * FLAGS (\Answered \Flagged \Deleted \Seen \Draft) * OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft)] * OK [NOMODSEQ] Sorry, this mailbox format doesn't support modsequences A4 OK [READ-WRITE] SELECT completed A5 SEARCH UNSEEN 1:13 * SEARCH 13 A5 OK Search completed A6 FETCH 13 (BODY.PEEK[HEADER.FIELDS (Message-ID)]) * 13 FETCH (BODY[HEADER.FIELDS (Message-ID)] {65} Message-ID: <175c8cc9-19fa-fc48-40c8-e42148578e23@XXXXXX.com> ) A6 OK Fetch completed A7 FETCH 13 (FLAGS) * 13 FETCH (FLAGS ()) A7 OK Fetch completed A8 FETCH 13 (BODYSTRUCTURE) * 13 FETCH (BODYSTRUCTURE (("text" "plain" ("charset" "utf-8" "format" "flowed") NIL NIL "7bit" 10 3 NIL NIL NIL)("image" "jpeg" ("name" "images.jpg") NIL NIL "base64" 16794 NIL ("attachment" ("filename" "images.jpg")) NIL) "mixed" ("boundary" "------------53A9AD932142735A4433B153") NIL NIL)) A8 OK Fetch completed A9 FETCH 13 (BODY.PEEK[HEADER]) * 13 FETCH (BODY[HEADER] {3286} Return-Path: <XXXXXX@XXXXXX.com> Delivered-To: XXXXXX@XXXXXX.com Received: (wp-smtpd mx.XXXXXX.com 31103 invoked from network); 22 May 2019 16:14:00 +0200 Received: from mail-XXX.google.com ([209.85.167.54]) (envelope-sender <XXXXXX@XXXXXX.com>) by mx.tlen.pl (WP-SMTPD) with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP for <XXXXXX@XXXXXX.com>; 22 May 2019 16:14:00 +0200 Received: by mail-XXX.google.com with SMTP id d8so1XXXb.8 for <XXXXXX@XXXXXX.com>; Wed, 22 May 2019 07:14:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=XXX.gappssmtp.com; s=XXX; h=to:from:subject:message-id:date:user-agent:mime-version :content-language; bh=8Bw7uLBuofXm3FHknjhDSjXXX=; b=kqcK74fTrzyDas7Wsn7EJfSxJuXXX== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-language; bh=8Bw7uLBuofXmXXXX6oDyAiCFLfHU=; b=F1EsLfk3qaiJXiNX0XXXXXXX== X-Gm-Message-State: APXXXXXX= X-Google-Smtp-Source: APXvXXXXXWYQ== X-Received: by 2002:a19:c517:: with SMTP id w23mr27342169lfe.73.1558534439904; Wed, 22 May 2019 07:13:59 -0700 (PDT) Return-Path: <XXXXXX@XXXXXX.com> Received: from [XXXXXX] (host-XXXXXX.com. [XXXXXX]) by smtp.gmail.com with ESMTPSA id XXXX for <XXXXXX@XXXXXX.com> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 May 2019 07:13:59 -0700 (PDT) To: XXXXXX@XXXXXX.com From: =?UTF-8?Q?XXX=c5=9bXX?= <XXXXXX@XXXXXX.com> Subject: Test attachment Message-ID: <175c8cc9-XXX23@XXXXXX.com> Date: Wed, 22 May 2019 16:13:58 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------53A9AD932142735A4433B153" Content-Language: pl X-WP-DKIM-Status: good (id: XXXXXX.com.gappssmtp.c) X-WP-MailID: 3f705f51c9402ad04c3cda34f72497b2 X-WP-SPAM: NO (U9) 0W0001A [0QMk] ) A9 OK Fetch completed ATTACHMENTS: 0
I've check all: imap, imaps, pop3 and pop3s