Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-6045

Camel Email Component Missing Attachments

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.6.0
    • 2.9.6, 2.10.4, 2.11.0
    • camel-mail
    • None
    • Patch Available
    • Unknown

    Description

      see http://camel.465427.n5.nabble.com/Camel-Email-Component-Missing-Attachments-td3386382.html#a5727102

      The disposition field is optional(see RFC 2183), so it is possible that camel misses attachments.

                      if (disposition != null && (disposition.equalsIgnoreCase(Part.ATTACHMENT) || disposition.equalsIgnoreCase(Part.INLINE))) {
                          // only add named attachments
                          String fileName = part.getFileName();
                          if (fileName != null) {
                              LOG.debug("Mail contains file attachment: " + fileName);
                              // Parts marked with a disposition of Part.ATTACHMENT are clearly attachments
                              CollectionHelper.appendValue(map, fileName, part.getDataHandler());
                          }
                      }
      

      Adding the fileName check to the if should resolve the issue.

      Attachments

        1. MailBinding.java.patch
          2 kB
          Christoph Giera

        Issue Links

          Activity

            People

              davsclaus Claus Ibsen
              cgiera Christoph Giera
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: