Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-53674

Event monitor emails always formatted as HTML

    XMLWordPrintable

    Details

      Description

      The event monitor allows to define the template of the notification in various format (HTML, Markdown, Moodle, Plain text). These notifications are sent via messaging API.

      The messaging API supports mailing out the messages as both text/plain and text/html mime-types (via content type multipart/alternative) or text/plain only if the user has it set in the user preferences.

      There is a bug in the event monitor tool that it formats the notification template into HTML and passes it to the messaging API in a way that is mailed out as text/plain at the end.

      Steps to reproduce:

      1. Set your messaging preferences so that you want to receive plain text emails, or use a client that allows you to view both text/plain and text/html parts of the email.
      2. Configure a rule for a monitored event. Use some HTML formatting in the notification template.
      3. Subscribe to the rule.
      4. Trigger the event.
      5. Let the cron run so that the message is sent to your email.

      Expected result: The text/plain part of the email should contain plain text.

      Actual result: The text/plain part of the email contains the HTML code.

      Suggested fix: Do it like forum does.

        Attachments

        1. screenshot-1.png
          screenshot-1.png
          32 kB
        2. screenshot-2.png
          screenshot-2.png
          22 kB
        3. screenshot-3.png
          screenshot-3.png
          22 kB
        4. screenshot-4.png
          screenshot-4.png
          31 kB
        5. screenshot-5.png
          screenshot-5.png
          20 kB

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                9/May/16