Uploaded image for project: 'Commons Email'
  1. Commons Email
  2. EMAIL-101

Specified Content-ID is not used when embedding a File object in an HtmlEmail

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.0, 1.1, 1.2
    • 1.3
    • None

    Description

      When calling the .embed(File file, String cid) method on HtmlEmail, the cid argument is never used within the method.

      Consequently, even when the user specifies a Content-ID for the embedded File, a new randomly generated Content-ID is generated every time.

      I believe this is as simple as changing the last line of .embed(File file, String cid) from:

      return embed(new FileDataSource(file), file.getName());

      To:

      return embed(new FileDataSource(file), file.getName(), cid);

      Attachments

        1. EMAIL-101_encoding.patch
          1 kB
          Thomas Neidhart
        2. EMAIL-101.patch
          4 kB
          Siegfried Goeschl
        3. HtmlEmailTest.patch
          1 kB
          Andrew Starodub
        4. HtmlEmail.patch
          0.1 kB
          Andrew Starodub

        Activity

          People

            sgoeschl Siegfried Goeschl
            tekkie Andrew Starodub
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: