I am doing a robot which is getting the sender email adress from x new and unread emails and save the adress into an excel sheet. The saving is working fine and is pretty simple.
The problem is getting the email adress.
Currently i receive the name only - like Surename, Forename (AB C DE) and i was trying to get the correct mail adress from the name but that is not working save… When Sureename, Forename.exists my contactbook gets broken.
Is there a way to get the sender email adress from a new mail?
I am assuming you are reading emails using ‘Get Outlook Mail Messages’ activity.
This should give you a collection of MailMessage objects which you then iterate with a for loop.
The mailmessage object will give you access to all the attributes of the email.
Example: For Each message in listOfMessages Assign → sender = message.From.ToString
There is also message.Sender object. See which one gives you the correct email address you’re looking for.