Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-32322

Email Archive embeds full html doc in page for html-formatted messages, hiding attachments

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Verified
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 11.3
    • Fix Version/s: 12.2, 19.0
    • Component/s: Email Archive
    • Labels:
      None
    • 12 status:
      Resolved
    • Test Plan:
      Hide

      You might need to be on the server to test unless it receives email. I was on localhost. Though I believe the nightlies are setup to receive email so a better test would be to verify SAK-33361 works and you can send from Outlook into Email Archive.

      • Added MailArchive to a site
      • Called the archive name test @localhost
      • Set the options of the site to allow receiving from anyone.

      Then on a unix command line type

      telnet 8025
      

      And paste the following, you may need to change it if your email archive To is different

      HELO example.com
      MAIL FROM: someone@example.com
      RCPT To: test@localhost
      DATA
      From: My Self <someone@example.com>
      To: A secret list <test@localhost>
      Subject: A simple test 
      Mime-Version: 1.0;
      Content-Type: text/html; charset="ISO-8859-1";
      Content-Transfer-Encoding: 7bit;
      
      <html>
      <body>
      <h2>An important link to look at!</h2>
      Here's an <a href="http://www.codestore.net">important link</a>
      </body>
      </html>
      .
      QUIT
      

      In the mail archive after a few seconds you should have an email that's viewable without any issues.

      Show
      You might need to be on the server to test unless it receives email. I was on localhost. Though I believe the nightlies are setup to receive email so a better test would be to verify SAK-33361 works and you can send from Outlook into Email Archive. Added MailArchive to a site Called the archive name test @localhost Set the options of the site to allow receiving from anyone. Then on a unix command line type telnet 8025 And paste the following, you may need to change it if your email archive To is different HELO example.com MAIL FROM: someone@example.com RCPT To: test@localhost DATA From: My Self <someone@example.com> To: A secret list <test@localhost> Subject: A simple test Mime-Version: 1.0; Content-Type: text/html; charset="ISO-8859-1"; Content-Transfer-Encoding: 7bit; <html> <body> <h2>An important link to look at!</h2> Here's an <a href="http://www.codestore.net">important link</a> </body> </html> . QUIT In the mail archive after a few seconds you should have an email that's viewable without any issues.

      Description

      If Email Archive receives an html-formatted message, the full html document of the message is embedded into the page when it is viewed.

      This means that there is a <html><head>...</head><body>...</body></html> in the rendered page where the message goes.

      In Sakai 11, the Email Archive is rendered inline, and the portal strips out everything after the first closing html, so the attachments display is lost (whereas if you view it in /portal/tool/... view, you can see the invalid markup and the attachments).

      The formatted email body needs to be stripped so that only the section inside the <body> tags is rendered.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  drramsey Derek Ramsey
                  Reporter:
                  smarquard Stephen Marquard
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  7 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Git Source Code