[c#] Delete exchange mailbox?
Exchange Server Forum Index Exchange Server
Discussion forums for Microsoft Exchange Server users.
Microsoft Outlook
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web ExchangeServerHelp.com
[c#] Delete exchange mailbox?

 
Post new topic   Reply to topic    Exchange Server Forum Index -> Development
Author Message
m.damen
Guest





Posted: Fri Sep 09, 2005 4:59 pm    Post subject: [c#] Delete exchange mailbox? Reply with quote

What is the proper way of deleting an exchange mailbox? There are very
little code examples of this available on the internet. Any help is
greatly appreciated.

Back to top
m.damen
Guest





Posted: Fri Sep 09, 2005 10:15 pm    Post subject: Re: Delete exchange mailbox? Reply with quote

I mean this in the c# language.. oddly enough this was not included in
my topic after posting.
Back to top
Joe Richards [MVP]
Guest





Posted: Sat Sep 10, 2005 12:58 am    Post subject: Re: Delete exchange mailbox? Reply with quote

I see it in the topic of your original post.

The supported way to manipulate Exchange is with the cdoexm libraries. This
means invoking the proper methods. See

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/e2k3/e2k3/_cdo_imailboxstore_deletemailbox.asp?frame=true


--
Joe Richards Microsoft MVP Windows Server Directory Services
www.joeware.net


m.damen wrote:
Quote:
I mean this in the c# language.. oddly enough this was not included in
my topic after posting.


Back to top
m.damen
Guest





Posted: Mon Sep 12, 2005 2:37 pm    Post subject: Re: Delete exchange mailbox? Reply with quote

Thanks alot Joe.

For future reference I have included a c# example (no c# example code
is listed on MSDN)

DirectoryEntry ent = new DirectoryEntry("LDAP://ou=Bar, dc=FOO,
dc=COM");
DirectoryEntry user = ent.Children.Find("CN=John Doe", "User");

CDOEXM.IMailboxStore mailbox = (CDOEXM.IMailboxStore)user.NativeObject;

mailbox.DeleteMailbox();
user.CommitChanges();

Best regards,
Maarten Damen

Joe Richards [MVP] wrote:

Quote:
I see it in the topic of your original post.

The supported way to manipulate Exchange is with the cdoexm libraries. This
means invoking the proper methods. See

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/e2k3/e2k3/_cdo_imailboxstore_deletemailbox.asp?frame=true


--
Joe Richards Microsoft MVP Windows Server Directory Services
www.joeware.net


m.damen wrote:
I mean this in the c# language.. oddly enough this was not included in
my topic after posting.
Back to top
 
Post new topic   Reply to topic    Exchange Server Forum Index -> Development All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server Dedicated Servers
Contact Us
New Topics Powered by phpBB