Outlook Interop dll has a recipient class where the email address of the user can be added. Below is the code
<code> Outlook.Application outlook = new Outlook.ApplicationClass();
Outlook.NameSpace ns = outlook.GetNamespace("Mapi");
object _missing = Type.Missing;
ns.Logon(_missing, _missing, false, false);
Outlook.Recipient recipient = (Outlook.Recipient)
Outlook.MAPIFolder inbox = ns.GetSharedDefaultFolder
int unread = inbox.UnReadItemCount;
foreach (Outlook.MailItem mail in inbox.Items)
string s = mail.Subject;
string body = mail.Body;
The code straight away accesses the emails. I think the domain user account, where the code runs, has to be an administrator account.
The permissions still keep coming. Iam currenly looking at the anti-virus programme to see anything can be configured here.