How to get the sender's info i.e. 'From' Address of the mail in OUTLOOK


#1

I am getting Null Reference Exception Please Help!!!


#2

Can you attach your workflow?
There can be 2 problems: wrong mailfolder or you want read "read"messages.


#3

yes i am trying to read already “read” messages
Does it not work for already read messages??


I have used all the possibilities but it is not working. It is showing the following Exception


Main.xaml (13.3 KB)

I have attached the file above


#4

Use method:
item.sender.toString
Try to writeline with this method

BTW have you changed typeargument in for each to system.net.mailmessage?
For me works


#5

I have changed the method but also it is not working!!!

See I have kept the following type argument … but the same exception occurs!!!
:frowning:


#6

Follow my steps:

  1. Create get outlook mail messages
  2. Adjsut mailFolder name, account can be empty, uncheck “onlyUnreadMessages”,create variable for output
  3. Create for each loop and change TypeArgument to System.net.mailMessage
  4. Create WriteLine and put inside “item.Sender.ToString”

Run the workflow.


#7

@lucky121 May be your not having mails for the filter condition u have set or u may have not assigned output variable to get mail messages activity. Check these two things once again.


#8

I had declared output variable for mail activity and i also have mails in the specified filtered folder in my outlook. I have unchecked both ‘Mark as Read’ and ‘Only Unread Messages’.
I am getting exception only when i am trying to extract sender’s name .
For all other attributes like subject,Headers,date it is working fine.I am facing problem only in extraction of “from address”.
I had also tried the steps you have mentioned above but there is no change!.The same exception is occurring.

What should be mentioned in the ’ Filter ’ section in ‘Get Outlook mail messages’ Activity???