mirror of
https://github.com/php/php-src.git
synced 2024-11-30 21:35:36 +08:00
d2bb59cc66
We setup the currently latest version of hMailServer[1] as mail server, and configure according to imap_include.inc. To not require further configuration, we adapt mail_skipif.inc and mail_include.inc to match that configuration. However, we also change the default domain to the reserved `example.com`. We also update the standard mail tests to use the `--EXTENSIONS--` section (instead of skipping the tests if ext/imap is not available). Finally, we fix bug80751.phpt to expect the configured To and Cc mail addresses. [1] <https://www.hmailserver.com/> Closes GH-8357.
22 lines
544 B
PHP
22 lines
544 B
PHP
<?php
|
|
|
|
require __DIR__ . "/../ext/imap/tests/setup/imap_include.inc";
|
|
|
|
$hmail = new COM("hMailServer.Application");
|
|
$hmail->authenticate("Administrator", "");
|
|
|
|
$domain = $hmail->Domains->Add();
|
|
$domain->Name = IMAP_MAIL_DOMAIN;
|
|
$domain->Active = true;
|
|
$domain->Save();
|
|
|
|
$accounts = $domain->accounts();
|
|
|
|
foreach (IMAP_USERS as $user) {
|
|
$account = $accounts->Add();
|
|
$account->Address = "$user@" . IMAP_MAIL_DOMAIN;
|
|
$account->Password = IMAP_MAILBOX_PASSWORD;
|
|
$account->Active = true;
|
|
$account->Save();
|
|
}
|