Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F61376130
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
Mon, May 6, 07:04
Size
936 B
Mime Type
text/x-php
Expires
Wed, May 8, 07:04 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
17503129
Attached To
rPH Phabricator
ManiphestCreateMailReceiver.php
View Options
<?php
final
class
ManiphestCreateMailReceiver
extends
PhabricatorApplicationMailReceiver
{
protected
function
newApplication
()
{
return
new
PhabricatorManiphestApplication
();
}
protected
function
processReceivedMail
(
PhabricatorMetaMTAReceivedMail
$mail
,
PhutilEmailAddress
$target
)
{
$author
=
$this
->
getAuthor
();
$task
=
ManiphestTask
::
initializeNewTask
(
$author
);
$from_address
=
$mail
->
newFromAddress
();
if
(
$from_address
)
{
$task
->
setOriginalEmailSource
((
string
)
$from_address
);
}
$handler
=
new
ManiphestReplyHandler
();
$handler
->
setMailReceiver
(
$task
);
$handler
->
setActor
(
$author
);
$handler
->
setExcludeMailRecipientPHIDs
(
$mail
->
loadAllRecipientPHIDs
());
if
(
$this
->
getApplicationEmail
())
{
$handler
->
setApplicationEmail
(
$this
->
getApplicationEmail
());
}
$handler
->
processEmail
(
$mail
);
$mail
->
setRelatedPHID
(
$task
->
getPHID
());
}
}
Event Timeline
Log In to Comment