Trying to get Sender Id from Outlook

I am trying to get the sender ID from outlook mail messages, but getting object reference as null value.

below is the my code

any help would be appreciate

Hi @Chaitan,

I hope you’re doing well. You don’t use .ToString if you press the dot again then it will give you options like the ones below that you can get. You can only get the ones that show there by using EmailSender = mail.From.Address I’m not sure if you are able to get the ID but you can get other things like the Name, address and other stuff.

image