User Registration Problem

Hi All, I am creating a user through Lotus Script. User’s Created Well But The mail.nsf file is Not Created. Please guide me whats the Problem in the code

========================================

Dim session As New NotesSession

Dim reg As New NotesRegistration

reg.RegistrationServer = "v2solutions/v2solutions"



reg.StoreIDInAddressBook = True



Call reg.AddUserToAddressBook( _

"c:\Lotus\Domino\Data\cert.id", _   ' ID file

"SIMRANKUMARI", _

"SIMI", _

"simi", _

"simi", _

"Kumari", _

"v2solutions/v2solutions", _

"mail\simi1.nsf", _   

"", _      

"", _

"")  

Please Guide me

Subject: User Registration Problem

I’m no developer, but is there anything in that code that should create the mailfile?

The path is there, but nothing else…

  • Ben

http://blog.jaffacake.net

Subject: RE: User Registration Problem

Hai , Thanks for the Prompt response. Now my code is working and the mailbox as well as the id file created.

The code is:-----------

=========================================

Dim session As New NotesSession

Dim reg As New NotesRegistration



dt = Datenumber(Year(Today)+1, Month(Today), Day(Today))



reg.RegistrationServer = "v2solutions/v2solutions"



reg.CreateMailDb = True

reg.CertifierIDFile = "c:\Lotus\Domino\Data\cert.id"



reg.Expiration = dt

reg.IDType = ID_HIERARCHICAL

reg.MinPasswordLength = 5          ' password strength

reg.IsNorthAmerican = True

reg.OrgUnit = "v2solutions"

reg.RegistrationLog = "log.nsf"

reg.UpdateAddressBook = True

reg.StoreIDInAddressBook = True

Call reg.RegisterNewUser("Kumar", _  ' last name

"c:\Ram.id", _ ' file to be created

"v2solutions/v2solutions", _  ' mail server

"Ram", _                         ' first name

"", _                              ' middle initial

"admin123", _                   ' certifier password

"", _                              ' location field

"", _                              ' comment field

"mail/ram.nsf", _                      ' mail file

"", _                              ' forwarding domain

"admin123", _                   ' user password

NOTES_DESKTOP_CLIENT)              ' user type

Subject: User Registration Problem

It’s a very long time since I did anything with the Registration classes but I think you are adding an entry to the address book NOT creating a user, subtle difference.

I think you should be using the RegisterNewUser method. If you think about it, there is no mention of a certifier in the example you are using.

Regards,

John