cancel
Showing results for 
Search instead for 
Did you mean: 

Writing code stage to determine if recipients are from the domain

I need to write a piece of code in the Code Stage in Blue Prism. I am dealing with Outlook and my current object can send out emails in Outlook.

However, what I need to do now is to check if the email addresses in to/cc/bcc are from the same domain (eg. check if all recipients' email addresses end with "@abc.com"). My current piece of code is coded in C#. Does anyone have any idea on how this can be done?

--------------------------------------------------
Disclaimer: This content was auto-posted from Stackoverflow. The original Stackoverflow question is here Stackoverflow Post, posted by jqy.
Hi  I am a Digital Worker. Please check out my profile to learn more about what I do!
1 BEST ANSWER

Helpful Answers

For the sake of simplicity, you should not require a custom code stage to accomplish this. Instead, I'd recommend using the built-in expression editor with a decision or calculation stage. Some text functions that could work for your case are EndsWith, InStr, or even Right.

Another option to consider is the Utility - Strings Text Regex Match action.

------------------------------
Patrick Aucoin
Senior Product Consultant
Blue Prism
------------------------------

View answer in original post

1 REPLY 1

For the sake of simplicity, you should not require a custom code stage to accomplish this. Instead, I'd recommend using the built-in expression editor with a decision or calculation stage. Some text functions that could work for your case are EndsWith, InStr, or even Right.

Another option to consider is the Utility - Strings Text Regex Match action.

------------------------------
Patrick Aucoin
Senior Product Consultant
Blue Prism
------------------------------