Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F106084506
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
Sat, Mar 22, 05:53
Size
1 KB
Mime Type
text/x-php
Expires
Mon, Mar 24, 05:53 (2 d)
Engine
blob
Format
Raw Data
Handle
25067574
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
->
loadExcludeMailRecipientPHIDs
());
if
(
$this
->
getApplicationEmail
())
{
$handler
->
setApplicationEmail
(
$this
->
getApplicationEmail
());
}
$handler
->
processEmail
(
$mail
);
$mail
->
setRelatedPHID
(
$task
->
getPHID
());
}
}
Event Timeline
Log In to Comment