Hi guys how do write if i want to file name to be base on the email sender name ?

Then in name field use System.Text.RegularExpressions.Regex.Replace(email.from.Address,"[^a-zA-Z0-9]")
This will ensure email id is used and all special characters are removed in name to remove any conflicts in name
Cheers
Assign: senderName = currentItem.From.DisplayName
Assign: validFileName = Regex.Replace(senderName, "[^a-zA-Z0-9]", "_") + ".msg"

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