Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F959368
ManiphestCreateMailReceiver.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
ManiphestCreateMailReceiver.php
View Options
<?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
Details
Attached
Mime Type
text/x-php
Expires
Tue, Jun 17, 9:53 PM (1 d, 15 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
223965
Default Alt Text
ManiphestCreateMailReceiver.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment