Page MenuHomePhorge

ManiphestCreateMailReceiver.php
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

ManiphestCreateMailReceiver.php

<?php
final class ManiphestCreateMailReceiver extends PhabricatorMailReceiver {
public function isEnabled() {
return PhabricatorApplication::isClassInstalled(
'PhabricatorManiphestApplication');
}
public function canAcceptMail(PhabricatorMetaMTAReceivedMail $mail) {
$maniphest_app = new PhabricatorManiphestApplication();
return $this->canAcceptApplicationMail($maniphest_app, $mail);
}
protected function processReceivedMail(
PhabricatorMetaMTAReceivedMail $mail,
PhabricatorUser $sender) {
$task = ManiphestTask::initializeNewTask($sender);
$task->setOriginalEmailSource($mail->getHeader('From'));
$handler = new ManiphestReplyHandler();
$handler->setMailReceiver($task);
$handler->setActor($sender);
$handler->setExcludeMailRecipientPHIDs(
$mail->loadExcludeMailRecipientPHIDs());
if ($this->getApplicationEmail()) {
$handler->setApplicationEmail($this->getApplicationEmail());
}
$handler->processEmail($mail);
$mail->setRelatedPHID($task->getPHID());
}
}

File Metadata

Mime Type
text/x-php
Expires
Tue, Jun 17, 9:53 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
223965
Default Alt Text
ManiphestCreateMailReceiver.php (1 KB)

Event Timeline