Send email post function: Manipulating email body
Hi Fidel,
I’m wondering if its possible to manipulate the email body with if-functions. I want to delete a complete line when the corresponding value is not set. Something like this:
E-Mail-Body
Due Date: %{XXXXX} Subject: %{000000} customfield XY != NULL ( Custom Field XY: %{10293} )
Best regards Patrick
Comments (4)
-
repo owner -
repo owner Any news on this issue?
-
reporter Yes, that works. But I'm not that happy with the workaround via ephemeral strings. When sendind multiple emails its a little bit complex. It would be great to use an "advanced mode" for email-creation.
-
repo owner - changed status to resolved
I haven't implemented this mode in the "Send an email" post-function because I find it quite awkward to compose a long text using advanced parsing mode, and I would like to provide a more easy way to do it.
I hope to find a feasible alternative to advanced parsing mode.
- Log in to comment
Hi Patrick,
Currently "Send an email" post-function doesn't only provides basic parsing mode, but you can implement what you intend to do with the following solution:
1) Use "Copy a parsed text to a field" post-function for composing the variable part of your email body and storing it in "Ephemeral string 1" virtual field. To do it use the following configuration:
replacing nnnnn with field code for "Custom Field XY".
2) Use "Send an email" post-function for sending an email, replacing the variable part of your body with field code for "Ephemeral string 1" (i.e, %{00061}).
Another possible solution, is to compose the whole body of your email using "Copy a parsed text to a field" post-function, storing it in "Ephemeral string 1". Then simply use field code for Ephemeral string 1" as the only content of your email's body in "Send an email" post-function.