You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@oozie.apache.org by "Andras Salamon (JIRA)" <ji...@apache.org> on 2019/07/18 06:21:00 UTC
[jira] [Updated] (OOZIE-3024) Email action ignores value of
content_type attribute when attachment attribute is set
[ https://issues.apache.org/jira/browse/OOZIE-3024?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andras Salamon updated OOZIE-3024:
----------------------------------
Summary: Email action ignores value of content_type attribute when attachment attribute is set (was: email action ignores value of content_type attribute when attachment attribute is set)
> Email action ignores value of content_type attribute when attachment attribute is set
> -------------------------------------------------------------------------------------
>
> Key: OOZIE-3024
> URL: https://issues.apache.org/jira/browse/OOZIE-3024
> Project: Oozie
> Issue Type: Bug
> Components: core
> Affects Versions: 4.2.0
> Reporter: Jim Hopper
> Assignee: Mate Juhasz
> Priority: Major
> Attachments: OOZIE-3024-V2.patch, OOZIE-3024.patch
>
>
> 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
> {code}
> 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);
> }
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)