1<?php 2 3require __DIR__ . "/../ext/imap/tests/setup/imap_include.inc"; 4 5$hmail = new COM("hMailServer.Application"); 6$hmail->authenticate("Administrator", ""); 7 8$domain = $hmail->Domains->Add(); 9$domain->Name = IMAP_MAIL_DOMAIN; 10$domain->Active = true; 11$domain->Save(); 12 13$accounts = $domain->accounts(); 14 15foreach (IMAP_USERS as $user) { 16 $account = $accounts->Add(); 17 $account->Address = "$user@" . IMAP_MAIL_DOMAIN; 18 $account->Password = IMAP_MAILBOX_PASSWORD; 19 $account->Active = true; 20 $account->Save(); 21} 22