dvaline
asked on
Exchange Server from D3
Points for example code for creating and deleting Mailboxes on the exchange server. I am using exchange server v4 sp5.
What I'd like are two functions...
CreateMailbox(UserName, FirstName, LastName, Server, Domain: String);
and
DeleteMailbox(UserName, Server, Domain: String);
What I'd like are two functions...
CreateMailbox(UserName, FirstName, LastName, Server, Domain: String);
and
DeleteMailbox(UserName, Server, Domain: String);
ASKER
Your answer is good, all I need is an example of how to Create a Mailbox and the points are yours, notice, I included a bonus...
I don't have the slightest idea how to do this but you can EMail the author and ask him for example:
ikojuharov@bitex.com
ikojuharov@bitex.com
I believe this is the article :
In the exchange administrator, you can export mailboxes, distribution lists
etc into .csv files, make changes, and then import it back into exchange,
which will create / delete modify these things. The easiest way to see what
it is doing, is export your mailboxes to the text file, and have a look. For
example the following text (save it to a text file) will create a mailbox,
with an associated NT account. Use the Tools\Directory Import command in the
exchange administrator. Change the "Primary Windows NT Account", and the
"Home-Server" items to your configuration. BTW, these are not all of the
available fields, just the ones we need to create this mailbox.
"Obj-Class","Mode","First Name","Last name","Display Name","Alias
Name","Directory Name","Primary Windows NT
Account","Home-Server","Ob j-Containe r"
"Mailbox","Create","Test", "User","Te st
User","TestUser","TestUser ","TEST\Te stUser","T ESTPDC","R ecipients"
If you want to do it programatically, look in the SDK for BatchImport and
BatchExport, which are the functions that the admin utilty uses. The format
of the file you pass to BatchImport is the same as above.
The main options under "Mode" are Create, Delete, and Modify, which are
fairly self explanatory. From memory, if you pass modify and the mailbox
doesn't exist, it will be created.
Zif.
In the exchange administrator, you can export mailboxes, distribution lists
etc into .csv files, make changes, and then import it back into exchange,
which will create / delete modify these things. The easiest way to see what
it is doing, is export your mailboxes to the text file, and have a look. For
example the following text (save it to a text file) will create a mailbox,
with an associated NT account. Use the Tools\Directory Import command in the
exchange administrator. Change the "Primary Windows NT Account", and the
"Home-Server" items to your configuration. BTW, these are not all of the
available fields, just the ones we need to create this mailbox.
"Obj-Class","Mode","First Name","Last name","Display Name","Alias
Name","Directory Name","Primary Windows NT
Account","Home-Server","Ob
"Mailbox","Create","Test",
User","TestUser","TestUser
If you want to do it programatically, look in the SDK for BatchImport and
BatchExport, which are the functions that the admin utilty uses. The format
of the file you pass to BatchImport is the same as above.
The main options under "Mode" are Create, Delete, and Modify, which are
fairly self explanatory. From memory, if you pass modify and the mailbox
doesn't exist, it will be created.
Zif.
ASKER
I've been aware of the functions, i have had little success in making them work.
If you have any plans of migrating your exchange servers to v5.5 in the near future, you should take a look at ADSI (http://backoffice.microsoft.com/downtrial/moreinfo/adsi2.asp). This is a Directory Service interface, which will allow you to add Exchange 5.5 stuff (users/distributionlists etc.), NT 4/5 stuff (users / shares..), IIS stuff, ?? stuff. You can talk to everything that talks LDAP.
I've just found this:
Exchange 4.0-5.5 DELPHI 3 interface - NEW VERSION
This unit is FREE for ANY comment`s, notes and etc.., but please for feedback.
Also included small DAPI DCOM SERVER, who create MAILBOX on Exchange Server, and sample Client application for DAPI DCOM SERVER.
Source: http://www.ccgc.net/dwn/dapi.htm
Exchange 4.0-5.5 DELPHI 3 interface - NEW VERSION
This unit is FREE for ANY comment`s, notes and etc.., but please for feedback.
Also included small DAPI DCOM SERVER, who create MAILBOX on Exchange Server, and sample Client application for DAPI DCOM SERVER.
Source: http://www.ccgc.net/dwn/dapi.htm
Yo,
are you still interested in a working answer ? If no, you could delete this question to move it out of the awaiting answers area. If yes, just post a comment.
Slash/d003303
are you still interested in a working answer ? If no, you could delete this question to move it out of the awaiting answers area. If yes, just post a comment.
Slash/d003303
ASKER
Yes
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I think it's only possible with the extended MAPI functions, but I never used these... I'll try to look it up but now you have a deriction to look at, yourself.
Regards, Zif.