Problem about creating mailbox on Mailenable Api

Discussion for developers using MailEnable.
Post Reply
mtdsoft
Posts: 1
Joined: Sun Aug 28, 2011 5:27 pm

Problem about creating mailbox on Mailenable Api

Post by mtdsoft »

I'm trying to create a simple account management tool for mailenable with asp.net api.

I successfully created postoffice and added domain into postoffice but creating mailbox part returns errors. Error message returned from api is just "failed" but I found this in windows events.
The description for Event ID 10000 from source MailEnable cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer. If the event originated on another computer, the display information had to be saved with the event. The following information was included with the event: MailEnable Postoffice Service error: 3 Timed out waiting to block for POSTOFFICES\sample.com\MAILBOX.
I searched on mailenable's support site and they say this is about permissions. I tried everything (running site with administrator user, giving "everyone" permission to the entire mailenable folder) but error still same.

this is my api codes for creating domain and an email address:

Code: Select all

public static void createDomain(string domain, string password)
{
    createDir(getKey("me_path") + @"Postoffices\" + domain);
    createDir(getKey("me_path") + @"Postoffices\" + domain + @"\mailroot");
    createDir(getKey("me_path") + @"Postoffices\" + domain + @"\mailroot\admin");
    createDir(getKey("me_path") + @"Postoffices\" + domain + @"\mailroot\admin\inbox");

    Postoffice objPostOffice = new Postoffice();
    objPostOffice.Status = 1;
    objPostOffice.Name = domain;
    objPostOffice.AddPostoffice();

    Domain objDomain = new Domain();
    objDomain.Status = 1;
    objDomain.DomainName = domain;
    objDomain.AccountName = domain;
    objDomain.DomainRedirectionStatus = 1;
    objDomain.AddDomain();

    Mailbox objMailbox = new Mailbox();
    objMailbox.Postoffice = domain;
    objMailbox.MailboxName = "admin";
    objMailbox.Limit = -1;
    objMailbox.RedirectAddress = "";
    objMailbox.RedirectStatus = 0;
    objMailbox.Status = 1;
    objMailbox.AddMailbox();

    Login objLogin = new Login();
    objLogin.Account = domain;
    objLogin.Description = "";
    objLogin.Password = password;
    objLogin.Rights = "USER";
    objLogin.Status = 1;
    objLogin.UserName = "admin";
    objLogin.AddLogin();

    AddressMap objAddressMap = new AddressMap();
    objAddressMap.Account = domain;
    objAddressMap.DestinationAddress = "[SF:" + domain + "/admin]";
    objAddressMap.Scope = "";
    objAddressMap.SourceAddress = "[SMTP:admin@" + domain + "]";
    objAddressMap.AddAddressMap();
}
thanks for your advises..

Post Reply