Multiple Delimeted Email Addresses in Email Event from Data Field

  • 25 March 2015
  • 5 replies
  • 3 views

Badge +1

I have a data field which contains semi-colon delimeted email addresses e.g. one@k2.com;two@k2.com. I want to use the Email Event in the K2 toolbox to send an email to all of the above recipients. How can I do this? This is what I've tried:

 

1. Comma delimeted instead of semi-colon delimeted email addresses.

2. Using the Split string function e.g. Split(EmailAddresses, ;) or Split(EmailAddresses, ";").

 

The error I get from K2 says:

 

"An invalid character was found in the mail header: ';'."

 

14999i6983B6BB98CADE3D.png


5 replies

Userlevel 5
Badge +16

Dear @Foo, 

 

you don't need to use any Inline function, just put your data field in the recipients  as long as its semi-colon delimited.

 

here is my data field and it works with me without any problem

13457i07CD41C989021354.png

 

 

Please let me know how you set the data of you data field.

 

Regards,

 

Badge +1

That was the first thing I tried but I get the following error when there is more than one email:

 

"An invalid character was found in the mail header: ';'."

 

I am setting the data field when I first kick off the K2 workflow, so it is being passed in. The only other difference, I can see is that I have unchecked the 'On Demand' flag on the data field.

Userlevel 5
Badge +16

Dear,

 

I guess your problem is in the FROM field, why are you using two data fields 15233i4D60201BD165B967.png

 

try to remove "AlsoNotifyEmail".

Badge +1

Thanks, I feel really silly now. Not sure how that got there.

Userlevel 5
Badge +16

You are welcom, it's alright :) it happens 

Reply