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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.0, 1.1, 1.2
    • Fix Version/s: 1.3
    • Labels:
      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. HtmlEmailTest.patch
          1 kB
          Andrew Starodub
        2. HtmlEmail.patch
          0.1 kB
          Andrew Starodub
        3. EMAIL-101.patch
          4 kB
          Siegfried Goeschl
        4. EMAIL-101_encoding.patch
          1 kB
          Thomas Neidhart

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: