Changeset View
Changeset View
Standalone View
Standalone View
src/applications/config/check/PhabricatorMailSetupCheck.php
<?php | <?php | ||||
final class PhabricatorMailSetupCheck extends PhabricatorSetupCheck { | final class PhabricatorMailSetupCheck extends PhabricatorSetupCheck { | ||||
public function getDefaultGroup() { | public function getDefaultGroup() { | ||||
return self::GROUP_OTHER; | return self::GROUP_OTHER; | ||||
} | } | ||||
protected function executeChecks() { | protected function executeChecks() { | ||||
if (PhabricatorEnv::getEnvConfig('cluster.mailers')) { | if (PhabricatorEnv::getEnvConfig('cluster.mailers')) { | ||||
return; | return; | ||||
} | } | ||||
$message = pht( | $message = pht( | ||||
'You haven\'t configured mailers yet, so Phabricator won\'t be able '. | 'You haven\'t configured mailers yet, so %s won\'t be able '. | ||||
'to send outbound mail or receive inbound mail. See the '. | 'to send outbound mail or receive inbound mail. See the '. | ||||
'configuration setting cluster.mailers for details.'); | 'configuration setting cluster.mailers for details.', | ||||
PhabricatorPlatformSite::getName()); | |||||
$this->newIssue('cluster.mailers') | $this->newIssue('cluster.mailers') | ||||
->setName(pht('Mailers Not Configured')) | ->setName(pht('Mailers Not Configured')) | ||||
->setMessage($message) | ->setMessage($message) | ||||
->addPhabricatorConfig('cluster.mailers'); | ->addPhabricatorConfig('cluster.mailers'); | ||||
} | } | ||||
} | } |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0