Search code examples
c#outlookoutlook-addinoutlook-2010

Mailitem doesn't provide any information about the sender


I tried the following:

var x = mailItem.Sender;
var y = mailItem.SenderEmailAddress;
var z = mailItem.SenderName;

All three variables have the value null. This the mailItem being edited in the ispector and I can access all other iformation like receptients, etc.... Any clue as to how get the sender name?


Solution

  • This one is even better and works anywhear:

    MailItem.SendUsingAccount.SmtpAddress;