Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15368371
D10314.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D10314.diff
View Options
diff --git a/src/applications/metamta/management/PhabricatorMailManagementSendTestWorkflow.php b/src/applications/metamta/management/PhabricatorMailManagementSendTestWorkflow.php
--- a/src/applications/metamta/management/PhabricatorMailManagementSendTestWorkflow.php
+++ b/src/applications/metamta/management/PhabricatorMailManagementSendTestWorkflow.php
@@ -79,6 +79,13 @@
$tos = $args->getArg('to');
$ccs = $args->getArg('cc');
+ if (!$tos && !$ccs) {
+ throw new PhutilArgumentUsageException(
+ pht(
+ 'Specify one or more users to send mail to with `--to` and '.
+ '`--cc`.'));
+ }
+
$names = array_merge($tos, $ccs);
$users = id(new PhabricatorPeopleQuery())
->setViewer($viewer)
@@ -103,6 +110,10 @@
}
$subject = $args->getArg('subject');
+ if ($subject === null) {
+ $subject = pht('No Subject');
+ }
+
$tags = $args->getArg('tag');
$attach = $args->getArg('attach');
$is_bulk = $args->getArg('bulk');
@@ -110,7 +121,6 @@
$console->writeErr("%s\n", pht('Reading message body from stdin...'));
$body = file_get_contents('php://stdin');
-
$mail = id(new PhabricatorMetaMTAMail())
->addTos($tos)
->addCCs($ccs)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 13, 1:34 AM (3 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7599531
Default Alt Text
D10314.diff (1 KB)
Attached To
Mode
D10314: Minor tweaks to `bin/mail send-test`
Attached
Detach File
Event Timeline
Log In to Comment