2 Replies Latest reply on Mar 29, 2010 3:11 PM by swiderski.maciej

    [jBPM 4.3] Mail node HTML. how to?

      Hi guys,

      I see in user guide that mail node supports html content. My problem is : how to write the node mail with html content. Can anyone help me?

      I've tried to use tag <html> with CDATA section or with escape for <anytag.... but nothing. The text in mail is : <html..... like text.

      Thanks in Advance

        • 1. Re: [jBPM 4.3] Mail node HTML. how to?

          I've tried with;

           

          <mail-template name="template">
            <from addresses="mail"/>
            <to addresses="#{mailTO}"/>
            <subject>Subject</subject>  
            <text>qwerty
              <html>
                <body>
                 <a href="www.google.it">here</a>              
                </body>
              </html>
           
            </text>
           
          </mail-template>
          

          The result is a simple text "here"

          Then i've tried with


          <mail-template name="template">
            <from addresses="mail"/>
            <to addresses="#{mailTO}"/>
            <subject>Subject</subject>  
            <text>qwerty</text>
              
            <html>
              <body>
               <a href="www.google.it">here</a>              
              </body>
            </html>
          
          
          </mail-template>
          
          
          

          The result is a mail with an attachment "noname" that is a page html with link.

          Can anyone help me?

          Thanks in advance

          • 2. Re: [jBPM 4.3] Mail node HTML. how to?
            swiderski.maciej

            Hi,

             

            finally found some time to look into your issue and I have to say that it works as expected.

             

            The only difference I can see between your code and my is that you use both <text> and <html> in one mail. If you do that then text will be visible as clear text not html and html stuff will be probably attached to it (at least that is what I observed during my tests) - as you described in your post as well.

             

            Here is my mail node with your html message:

             

            <mail name="mailtestmail" g="116,147,80,40">
                 <to addresses="your.email@gmail.com" />
                 <subject>mail</subject>
                 <html>
                      <body>
                      <a href="www.google.it">here</a>Ê
                      </body>
                 </html>
                 <transition name="to java1" to="java1" g="-47,-18" />
            </mail>
            

            I use google as smtp server over SSL.

             

            Tested on jBPM 4.3 and 4.4.