Uploaded image for project: 'Camel'
  1. Camel
  2. SMXCOMP-499 Improvements for attachment handling (also inline attachments)
  3. CAMEL-1507

Allow sending multipart/alternative MIME messages with both a plain-text and text/html body, and allow sending images inline

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0-M1
    • 1.6.1, 2.0-M2
    • camel-mail
    • None
    • Patch Available

    Description

      To send a multipart/alternative email you have to follow a pretty specific course.

      This adds a property (which is poorly named in this patch) to the MailConfiguration that names the header that contains the plaintext version of the email, and adds a property where you can embed images inline. If an attachment has a filename starting with "cid:" then this will add the "Content-ID" header to that multipart body - which will allow the email client to put the image in the appropriate place when it is viewed. (i.e. the html email has something like <image src="cid:0001" /> and the attachment is named 'cid:0001' - when it sees an inline attachment with "Content-ID: 0001" it will put it in the right spot)

      Attachments

        1. camel-mail-test2.zip
          21 kB
          Ryan Gardner
        2. mulitpartAlternativePatch.patch
          16 kB
          Ryan Gardner

        Issue Links

          Activity

            People

              njiang Willem Jiang
              ryangardner Ryan Gardner
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: