Changeset View
Changeset View
Standalone View
Standalone View
src/applications/metamta/storage/PhabricatorMetaMTAMail.php
| Show First 20 Lines • Show All 366 Lines • ▼ Show 20 Lines | $this->openTransaction(); | ||||
| $all_phids = array_unique(array_merge( | $all_phids = array_unique(array_merge( | ||||
| $recipient_phids, | $recipient_phids, | ||||
| $expanded_phids)); | $expanded_phids)); | ||||
| foreach ($all_phids as $curr_phid) { | foreach ($all_phids as $curr_phid) { | ||||
| $editor->addEdge($this->getPHID(), $edge_type, $curr_phid); | $editor->addEdge($this->getPHID(), $edge_type, $curr_phid); | ||||
| } | } | ||||
| $editor->save(); | $editor->save(); | ||||
| $this->saveTransaction(); | |||||
| // Queue a task to send this mail. | // Queue a task to send this mail. | ||||
| $mailer_task = PhabricatorWorker::scheduleTask( | $mailer_task = PhabricatorWorker::scheduleTask( | ||||
| 'PhabricatorMetaMTAWorker', | 'PhabricatorMetaMTAWorker', | ||||
| $this->getID(), | $this->getID(), | ||||
| array( | array( | ||||
| 'priority' => PhabricatorWorker::PRIORITY_ALERTS, | 'priority' => PhabricatorWorker::PRIORITY_ALERTS, | ||||
| )); | )); | ||||
| $this->saveTransaction(); | |||||
| return $result; | return $result; | ||||
| } | } | ||||
| public function buildDefaultMailer() { | public function buildDefaultMailer() { | ||||
| return PhabricatorEnv::newObjectFromConfig('metamta.mail-adapter'); | return PhabricatorEnv::newObjectFromConfig('metamta.mail-adapter'); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 792 Lines • Show Last 20 Lines | |||||