Path: blob/master/src/applications/maniphest/mail/ManiphestCreateMailReceiver.php
12256 views
<?php12final class ManiphestCreateMailReceiver3extends PhabricatorApplicationMailReceiver {45protected function newApplication() {6return new PhabricatorManiphestApplication();7}89protected function processReceivedMail(10PhabricatorMetaMTAReceivedMail $mail,11PhutilEmailAddress $target) {1213$author = $this->getAuthor();14$task = ManiphestTask::initializeNewTask($author);1516$from_address = $mail->newFromAddress();17if ($from_address) {18$task->setOriginalEmailSource((string)$from_address);19}2021$handler = new ManiphestReplyHandler();22$handler->setMailReceiver($task);2324$handler->setActor($author);25$handler->setExcludeMailRecipientPHIDs(26$mail->loadAllRecipientPHIDs());27if ($this->getApplicationEmail()) {28$handler->setApplicationEmail($this->getApplicationEmail());29}30$handler->processEmail($mail);3132$mail->setRelatedPHID($task->getPHID());33}3435}363738