Workflow Email Task has a very strict rules and fails for simple reasons?

  • 10 October 2019
  • 4 replies
  • 5 views

I have a workflow which has a functionality to send emails using a Email task . But tehe emails are dynamically constructed using string concatenations. I found that this email task (in teh workflow) is pretty un-forgiving and brutal . 

 

What I found was that :

1. if the email string has more than one semi colon it fails

example : *personal details removed*;;*personal details removed* - This string if passed in the CC of the workflow notification the email task will fail at run time

2. if the email string end with semi colon (string has a semi-colon at teh end)  it fails

example : *personal details removed*;*personal details removed*;  - This string if passed in the CC of the workflow notification the email task will fail at run time

Is this the behaviour observed by anyone else? Is there any best practice to achive this instead of writing ridiculous experssions to handle these conditions?

 

Any help is appreciated.

 

 


4 replies

Hello,

Expressions are the best way around this. There can be other ways to workaround the issue, such as using a smartobject as a repository and pulling back the information from there as a list. K2 emails have to play by the rules of regular emails, and having two semicolons together usually causes emails to fail to send if hard-coded as well.

if you place *personal details removed*;;*personal details removed* 

OR 

*personal details removed*;*personal details removed*; 

 

in both the above scenarios, Outlook has no problem sending the emails. 

It resolved them correctly and sends it...


@MTMTNT wrote:
Hello,

Expressions are the best way around this. There can be other ways to workaround the issue, such as using a smartobject as a repository and pulling back the information from there as a list. K2 emails have to play by the rules of regular emails, and having two semicolons together usually causes emails to fail to send if hard-coded as well.

if you place *personal details removed*;;*personal details removed* 

OR 

*personal details removed*;*personal details removed*; 

 

in both the above scenarios, Outlook has no problem sending the emails. 

It resolved them correctly and sends it...

Userlevel 2
Badge +9

Dear nagrotteGA, 


You are correct on both counts: Outlook does this just fine, K2 email notifications do not. 


MTMTNT's suggestion is a viable way of using built-in K2 functionality (expressions) to address this. 


 


Please also consider adding an item to our Ideas site to ensure this functionality is on Product Management's radar. This is an excellent way to help us prioritize features and fixes.


 


Thanks, and regards,


Gail

Reply