Skip to main content

Using the Exchange online send an email action, as I want a user to be able to reply to the email.

But the design is such that I’m sending to multiple addresses held in variables, and sometimes one or more of those variables could be empty.  

That’s throwing an error that the empty string cannot be resolved to a user, which must happen before an email is sent.

How do we handle those sorts of scenarios without a hundred different “set conditions” to try to handle all the possible combinations of one or the other variables being blank (there are actually 4 different variables in my case, so I’d have a large number of potential combinations of things being filled while others blank, and any blank causes an error).  

I originally thought to concatentate a string, but a string with multiple email addresses also throws an error.  
Any guidance?

Can you not use the send an email action provided by nintex vs exchange?

 

I dont have issues on that one. 


I always had issues with exchange actions, as it won't let you send on behalf of someine else. Has to be the same account the connection is setup under. 

 

Just use send an email and update sender name as whatever name you want it is coming from like a department name etc (they deafult to noreply mailbox adress and i dont get why.... its actually a sender name field so it confuses people in my company cause whatever yoy put there it'll still come through from the no reply mailbox by nintex). Then they have a feature as well for reply to. You Can put an actual email there for replies. 

 


I would also propose a loop and condition to build a string of emails that skips the empty variables if that is what is hanging you up. Not sure how your variables are but i normally will do a a loop then a condition for alot of my string building for text fields or if i need to add multiple people back to a multi person field in SharePoint field .....consition would be if empty skip ....do nothing on that branch for the loop.... if not empty it'll have a second condition for my string variable that if empty add email and if not empty take string variable and add semicolon and add another email etc and it'll just keep looping until done..... your emails would have to be stored in a collection for that to work though.  Or loop your variables until blank or empty etc

If you have to have multiple collections that if fine, instead of empty just do condition.on if number of returned items is greater tgan 0 then build string if not do nothing.

Then add the string variable of emails to the exchange email. 

 

Based on what your saying you may have to do a regular expression to extract the emails anyways to add to emails to collection to even begin building a string. Not really sure unless i saw what the ouput variables  looked like that you are referring to but those are my thoughts. Hope one of the ideas helps. 

 

 

 


Reply