Uploaded image for project: 'Oozie'
  1. Oozie
  2. OOZIE-3024

Email action ignores value of content_type attribute when attachment attribute is set

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.2.0
    • 5.2.0
    • core
    • None

    Description

      The email action ignores value of content_type attribute when attachment attribute is set.
      This results in an email with a html body sent as a plaintext.

      https://github.com/apache/oozie/blob/master/core/src/main/java/org/apache/oozie/action/email/EmailActionExecutor.java#L251

      if(contentType.equals("text/html")) {
                      MimeBodyPart bodyHtmlPart = new MimeBodyPart();
                      bodyHtmlPart.setContent(body, contentType);
                      multipart.addBodyPart(bodyHtmlPart);
                  }
                  else{
                      MimeBodyPart bodyTextPart = new MimeBodyPart();
                      bodyTextPart.setText(body);
                      multipart.addBodyPart(bodyTextPart);
                  }
      

      Attachments

        1. OOZIE-3024.patch
          1 kB
          Mate Juhasz
        2. OOZIE-3024-V2.patch
          5 kB
          Mate Juhasz

        Issue Links

          Activity

            People

              matijhs Mate Juhasz
              hopperjim Jim Hopper
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: