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 Bug
    • Status: Closed
    • Priority: Minor 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);

      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:
            Siegfried Goeschl
            Reporter:
            Andrew Starodub
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development