Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93195731
ManiphestCreateMailReceiver.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Nov 26, 22:44
Size
1 KB
Mime Type
text/x-php
Expires
Thu, Nov 28, 22:44 (2 d)
Engine
blob
Format
Raw Data
Handle
22593620
Attached To
rPH Phabricator
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
->
loadAllRecipientPHIDs
());
if
(
$this
->
getApplicationEmail
())
{
$handler
->
setApplicationEmail
(
$this
->
getApplicationEmail
());
}
$handler
->
processEmail
(
$mail
);
$mail
->
setRelatedPHID
(
$task
->
getPHID
());
}
}
Event Timeline
Log In to Comment