Commons Email
  1. Commons Email
  2. EMAIL-80

Message incorrectly displayed on outlook and Outlook Web access

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.1
    • Fix Version/s: 1.2
    • Labels:
      None

      Description

      Hello.

      I try to write HTML Email with version 1.1 and 1.0.
      With version 1.1, I found that the email was not correctly display when there is no image embed into the mail content. Outlook web access only display the text message and the HTML content is attached as an attachment.
      But, when there is at least one image, the message is corerctly displayed.

      This does not happends with version 1.0.

      Here is the source code used:

      HtmlEmail email = new HtmlEmail();
      email.setHostName("192.32.16.76");
      email.setFrom("user@domain.com");
      email.addTo("user1@domain.com");

      String s_RessourceName = "support.gif";
      URL url = TestLoader.class.getResource(s_RessourceName);
      StringBuffer sb_MsgContent = new StringBuffer();
      sb_MsgContent.append("<html><body><center><b>mon message pour voir ma classe sans image</b></center>");
      sb_MsgContent.append("</body></html>");
      email.setHtmlMsg(sb_MsgContent.toString());

      email.setTextMsg("Your email client does not support HTML messages");
      email.send();

      And with image

      HtmlEmail email = new HtmlEmail();
      email.setHostName("192.32.16.76");
      email.setFrom("user@domain.com");
      email.addTo("user1@domain.com");

      String s_RessourceName = "support.gif";
      URL url = TestLoader.class.getResource(s_RessourceName);
      String s_RessourceId = email.embed(url, "Support logo");
      StringBuffer sb_MsgContent = new StringBuffer();
      sb_MsgContent.append("<html><body><center><b>mon message pour voir ma classe sans image</b></center>");
      sb_MsgContent.append("<p><img src=\"cid:").append(s_RessourceId).append("\"></p>");
      sb_MsgContent.append("</body></html>");
      email.setHtmlMsg(sb_MsgContent.toString());

      email.setTextMsg("Your email client does not support HTML messages");
      email.send();

      Regards

      Etienne Jouvin

        Activity

        Hide
        Steve Markoff added a comment -

        I am having the same problem and look forward to this bug being fixed. thanks.

        Show
        Steve Markoff added a comment - I am having the same problem and look forward to this bug being fixed. thanks.
        Hide
        Michael Ossareh added a comment -

        Hi,

        This fixes the problem that you describe in GMail. I assume the problem is the same with outlook web access, if you could confirm that that would be great. The patch is for the trunk version of the library. Similar changes to the current 1.1 release were a slight PITA to work out (the trunk releases constructs all the parts in a more hierarchical fashion).

        Show
        Michael Ossareh added a comment - Hi, This fixes the problem that you describe in GMail. I assume the problem is the same with outlook web access, if you could confirm that that would be great. The patch is for the trunk version of the library. Similar changes to the current 1.1 release were a slight PITA to work out (the trunk releases constructs all the parts in a more hierarchical fashion).
        Hide
        Siegfried Goeschl added a comment -

        Hi Michael,

        not sure if your patch is actually needed - did you test the most recent trunk with GMail? I applied a patch two weeks ago which should fix the problems (hopefully). I just sent you a few test emails to your gmail address and would be very happy if you could provide feedback.

        Show
        Siegfried Goeschl added a comment - Hi Michael, not sure if your patch is actually needed - did you test the most recent trunk with GMail? I applied a patch two weeks ago which should fix the problems (hopefully). I just sent you a few test emails to your gmail address and would be very happy if you could provide feedback.
        Hide
        Michael Ossareh added a comment -

        Hi Siegfried,

        I checked out trunk and I had the same issue. I can certainly re-verify this tomorrow. I can certainly verify that your tests work as I would expect them to (i.e. I can see the html).

        To verify, I should be using

        HtmlEmail.addHtmlMsg and HtmlEmail.addTextMsg to add html and text respectively?

        Show
        Michael Ossareh added a comment - Hi Siegfried, I checked out trunk and I had the same issue. I can certainly re-verify this tomorrow. I can certainly verify that your tests work as I would expect them to (i.e. I can see the html). To verify, I should be using HtmlEmail.addHtmlMsg and HtmlEmail.addTextMsg to add html and text respectively?
        Hide
        Michael Ossareh added a comment -

        Hi Siegfried,

        You were right, the trunk version works correctly - I actually found out the issue when I was testing with the trunk copy was to do with my deploy environment. ZZZ, /me makes sure to check that stuff correctly next time!!

        Sorry for the noise, thanks for following up with me.

        Mike

        Show
        Michael Ossareh added a comment - Hi Siegfried, You were right, the trunk version works correctly - I actually found out the issue when I was testing with the trunk copy was to do with my deploy environment. ZZZ, /me makes sure to check that stuff correctly next time!! Sorry for the noise, thanks for following up with me. Mike
        Hide
        Siegfried Goeschl added a comment -

        With the help of the commons community we did some field testing to verify that the HTMLEmail is properly created and displayed
        Got positive feedback for

        +) Apple Mail 2.1.3 on Mac OS X 10.4
        +) Thunderbird 2.0.0.19 on Mac OS X 10.5
        +) Thunderbird 2.0.0.19 on Ubuntu 8.10
        +) Outlook 2007 on Win XP Pro 64 bit
        +) Evolution 2.24.2 on Ubuntu 8.10
        +) OWA (full on IE 7, cut-down on Firefox)
        +) GMail
        +) Yahoo! Mail

        We have problems with 1.9.9 (KDE 3.5.9) but this could be a general issue with KMail

        Show
        Siegfried Goeschl added a comment - With the help of the commons community we did some field testing to verify that the HTMLEmail is properly created and displayed Got positive feedback for +) Apple Mail 2.1.3 on Mac OS X 10.4 +) Thunderbird 2.0.0.19 on Mac OS X 10.5 +) Thunderbird 2.0.0.19 on Ubuntu 8.10 +) Outlook 2007 on Win XP Pro 64 bit +) Evolution 2.24.2 on Ubuntu 8.10 +) OWA (full on IE 7, cut-down on Firefox) +) GMail +) Yahoo! Mail We have problems with 1.9.9 (KDE 3.5.9) but this could be a general issue with KMail

          People

          • Assignee:
            Siegfried Goeschl
            Reporter:
            Etienne Jouvin
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development