Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F63648758
PhabricatorMailManagementListOutboundWorkflow.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, May 21, 14:47
Size
1 KB
Mime Type
text/x-php
Expires
Thu, May 23, 14:47 (2 d)
Engine
blob
Format
Raw Data
Handle
17801009
Attached To
rPH Phabricator
PhabricatorMailManagementListOutboundWorkflow.php
View Options
<?php
final
class
PhabricatorMailManagementListOutboundWorkflow
extends
PhabricatorMailManagementWorkflow
{
protected
function
didConstruct
()
{
$this
->
setName
(
'list-outbound'
)
->
setSynopsis
(
'List outbound messages sent by Phabricator.'
)
->
setExamples
(
"**list-outbound**"
)
->
setArguments
(
array
(
array
(
'name'
=>
'limit'
,
'param'
=>
'N'
,
'default'
=>
100
,
'help'
=>
'Show a specific number of messages (default 100).'
,
),
));
}
public
function
execute
(
PhutilArgumentParser
$args
)
{
$console
=
PhutilConsole
::
getConsole
();
$viewer
=
$this
->
getViewer
();
$mails
=
id
(
new
PhabricatorMetaMTAMail
())->
loadAllWhere
(
'1 = 1 ORDER BY id DESC LIMIT %d'
,
$args
->
getArg
(
'limit'
));
if
(!
$mails
)
{
$console
->
writeErr
(
"%s
\n
"
,
pht
(
"No sent mail."
));
return
0
;
}
foreach
(
array_reverse
(
$mails
)
as
$mail
)
{
$console
->
writeOut
(
"%s
\n
"
,
sprintf
(
"% 8d %-8s %s"
,
$mail
->
getID
(),
PhabricatorMetaMTAMail
::
getReadableStatus
(
$mail
->
getStatus
()),
$mail
->
getSubject
()));
}
return
0
;
}
}
Event Timeline
Log In to Comment