Support Questions

Find answers, ask questions, and share your expertise
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

Oozie email action with content_type (text/html) and attachment tag is sending mail in normal text/plain format

New Contributor

My application work with some dynamic generated files & once my workflow is complete, I need to send the details of files in the success mail in a table format. After going through oozie docs I figured out that we can use <content_type>text/html</content_type> to do the same.

My code is working fine if I use only <content_type> tag in oozie email action (mail body is delivered in table format). But I need to use <attachment> tag as well in my email action. While doing the same, the <content_type> tag isn't working as expected & I'm receiving mail in text/plain format.

Given below is my code snippet

<action name="success">
   <email xmlns="uri:oozie:email-action:0.2">
      <subject>${from_env} Success: Workflow ${wf:name()} completed successfully</subject>
            <tr><td>   WORKFLOW NAME </td>       <td> : ${wf:name()}   </td></tr>
            <tr><td>   WORKFLOW ID </td>     <td> : ${wf:id()}        </td></tr>
            <tr><td>   ACO NAME </td>       <td> : ${acoName}        </td></tr>
            <tr><td>   ACO_ID </td>         <td> : ${acoId}      </td></tr>
            <tr><td>   CUSTOMER_ID </td>     <td> : ${customerID}  </td></tr>
            <tr><td>   SUPPLIER_ID </td>     <td> : ${supplierId}  </td></tr>
            <tr><td>   APP PATH </td>       <td> : ${wf:appPath()} </td></tr>


1- If I'm not using the <attachment> tag email-action is working fine & i'm receiving mail in table format

2- While using <content_type> & <attachment> tag together it is not working as expected

Any help appreciated!! Thanks!


New Contributor

I am facing the same issue. Did you find the solution?

New Contributor

Facing the same issue, while the <content_type> is text/html and <attachment> specified, sends mail in text/plain format.

Any work-around/solutions would be much appreciated.

New Contributor

I am facing the same issue to. Did you find the solution?

Issue 2017 year, but we are using oozie in our solution now

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.