0

I am able to create a process mailbox and I am able to access thru https://ExchangeServer/owa/processmailbox@domain.com then I will give my credentials and I am able to Login.

But I am not able to access thru EWS. It says SMTP address has no mailbox associated with it.

I am able to access my inbox with the same code..

1 Answers1

0

If you are able to connect to the mailbox through your exchange mail then you should be able to do the same in EWS. Create a service (ExchangeService) where you login with your exchange credentials and then use that service to connect to the mailbox

Mailbox mb = new Mailbox("processmailbox@domain.com");
FolderId fid = new FolderId(WellKnownFolderName.Inbox, mb);
ItemView view = new ItemView(100);

//use your service to get 100 mails from the mailbox
var findResults = service.FindItems(fid, view);

foreach (var item in findResults.Items)
{
    var message = EmailMessage.Bind(service, item.Id, new PropertySet(BasePropertySet.FirstClassProperties, ItemSchema.Attachments));
}
Marcus Höglund
  • 16,172
  • 11
  • 47
  • 69
  • Yes. I am able to connect to the process mailbox from my Exchange client. My primary email is on office365. But the process mailbox cannot be accessed thru Office 365. – Hariharan Nagarajan Jun 17 '16 at 04:01
  • @HariharanNagarajan But is the process mailboxed on office365 or not? If you can connect through EWS to your office365 account then it shouldn't be a problem to connect to the process mailbox if that is also on office365. If you have problem with the connection read this http://stackoverflow.com/questions/32355440/connection-to-office-365-by-ews-api – Marcus Höglund Jun 18 '16 at 07:20