afterlogic / webmail-lite-8

Open-source webmail script for existing IMAP server
https://afterlogic.org/webmail-lite-8
GNU Affero General Public License v3.0
335 stars 71 forks source link

Cannot load mail servers config from DB #29

Closed garciacarmonaam closed 5 years ago

garciacarmonaam commented 5 years ago

Hello,

I am trying to add new mail servers to AfterLogic adding new rows to strings, texts, bool and int tables

Anyway it is impossible to login with these domains then despite of being matched with the same id (I don't refer to primary key, but to the second param.

Are really those configs loaded from another place?

afterlogic-support commented 5 years ago

Sorry, not sure what exactly you're doing, do you need to add a mail server via API? And can you maybe provide a few lines of your code?

afterlogic-support commented 5 years ago

Anyway, adding mail server can be done as follows:

include_once '/var/www/webmail/system/autoload.php';
\Aurora\System\Api::Init(true);
...
\Aurora\System\Api::GetModuleDecorator('Mail')->CreateServer(
        "domain.com", 
        "imap.domain.com", 143, false,
        "smtp.domain.com", 25, false,
        \Aurora\Modules\Mail\Enums\SmtpAuthType::UseUserCredentials,
        "domain.com"
    );
garciacarmonaam commented 5 years ago

Hello,

I just was making MySQL scripts with INSERT TO order through MySQLi.

I didn't know about your api. Far more easier. I'll work in.

Thanks. I'll keep you up-to-dated