Decision depending on who the email message is from

I am working on creating a flow chart where if an email is sent by user A then they’ll receive an email. All other users who are not user A will fall under the false decision path.

In the decision activity I am doing

GetMailActivity.Equals(checkFrom,"userA@email.com")= True

Thank you in advance!

What is the question?

If you’re trying to determine who an email is from, you can use the MailMessage.From property

My question is how can I check who the message is from? ’
If the message is from userA = true then how can I put that in the decision flow?
Thank you.

I’ll assume you saved the email as a MailMessage variable called MyEmail and userA is a string

In the decision box you’d put: MyEmail.From = userA - note that this is case sensititive. If you want it to be case insensitive you can use: String.Equals(MyEmail.From,userA,StringComparison.OrdinalIgnoreCase)

Thank you! This is what I was looking for!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.