Want to get the sender information of an email

Hi Guys,
I want to get the sender info of an email, use " email.from.tostring"
Most of time, it worked.
But a person’s email address was never obtained, the error msg is “Object reference not set to an instance of an object.”
Hope someone can help me solve this problem, thanks in advance

Hi!

What activity are you using to collect the e-mail information?

This error happens when the object (The e-mail in this case) actually is null, which means when you collected the e-mail, it doesn’t get anything or you are not using a Mail activity.

You can refer to this link for better understanding: Object Reference Not Set to an Instance of an Object: How To Solve It

Hope it helps,
Best Regards

Hi Marcelo,

Thanks for your reply~

Finally, I found that “email.from.tostring” in my desktop is OK, when I run it on Virtual client, it failed….

email.logo.png

button_forum.png

button_community.png

button_academy.png

robot.png

This means that the e-mail is not correctly configured on the virtual client as it is in the desktop, which results in UiPath not being able to collect it.

It’s strange, I can get other people’s email address, except for that one.

email.logo.png

image002.jpg

button_forum.png

button_community.png

button_academy.png

robot.png

This e-mail address is in the same domain (@domain.com) as the others that are sucessful? If not, maybe is some kind of conflict with the server.

If yes, maybe try to get all e-mails and loop each one to find what you need: