Send email with HTML body

Issue #613 resolved
Saida Aslanova created an issue

Hi, I have face the following issue. We have a web service, which posts to another system to generate passwords. Then this password is sent by email to customer in HTML body using your post-function. Now about the problem.

<body> Hi, %{Reporter's full name}! <br /> <br /> %{Custom email body} <br />

<br /><br /> <hr />

<div id="custom_id" class="panel panel-default"> <div class="panel-body custom_class" style="background-color:#C1D2D2"> <h4 class = "panel-body">This letter is for informational purposes only. Please do not reply. </h4> </div> </div>

</body>

When %{Custom email body} contains '<', for example, S<nd77 the message is trunced after this symbol. Could you please advice some workaround? Thanks in advance!

Comments (6)

  1. Fidel Castro Armario repo owner

    Hi @SaidAslan,

    Can you, please, show me the post-function you are using for setting field Custom email body? A screenshot with the configuration of the post-function will be ok.

  2. Saida Aslanova reporter

    Hi Fidel, The field is setting in groovy script on transition. It takes value from the response of the web service. But, not I've tried to do the same with field on the screen of transition.

    1.png

    3.png

    2.png

  3. Fidel Castro Armario repo owner

    @SaidAslan,

    Try using "Copy a parsed text to a field" post-function just before "Send an email" post-function with the following configuration:

    • Target field: Custom email body
    • Parsing mode: advanced
    • Text to be parsed...: escapeHTML(%{nnnnn})

    replacing nnnnn with field code for Custom email body custom field.

  4. Log in to comment