Commit 6011085b0fcd breaks sending certain email


#1

Observed Behavior:
After git pull phabricator today, Phabricator can no longer send certain mails. For example, the user approval notification messages and other short messages.

./bin/mail send-test --to someone@somewhere.com --subject test
and type in a few words, ctl-d, will get the following error

[2018-06-13 04:32:48] EXCEPTION: (phpmailerException) Message body empty at [/externals/phpmailer/class.phpmailer.php:562]
arcanist(head=master, ref.master=df7313bdf2a3), phabricator(head=master, ref.master=1459fb303769), phutil(head=master, ref.master=4206849bb05b), sprint(head=master, ref.master=9da8f6c3f272)
#0 PHPMailer::Send() called at [/src/applications/metamta/adapter/PhabricatorMailImplementationPHPMailerAdapter.php:159]
#1 PhabricatorMailImplementationPHPMailerAdapter::send() called at [/src/applications/metamta/storage/PhabricatorMetaMTAMail.php:619]
#2 PhabricatorMetaMTAMail::sendWithMailers(array) called at [/src/applications/metamta/storage/PhabricatorMetaMTAMail.php:505]
#3 PhabricatorMetaMTAMail::sendNow() called at [/src/applications/metamta/PhabricatorMetaMTAWorker.php:22]
#4 PhabricatorMetaMTAWorker::doWork() called at [/src/infrastructure/daemon/workers/PhabricatorWorker.php:123]
#5 PhabricatorWorker::executeTask() called at [/src/infrastructure/daemon/workers/PhabricatorWorker.php:162]
#6 PhabricatorWorker::scheduleTask(string, integer, array) called at [/src/applications/metamta/storage/PhabricatorMetaMTAMail.php:481]
#7 PhabricatorMetaMTAMail::save() called at [/src/applications/metamta/management/PhabricatorMailManagementSendTestWorkflow.php:193]
#8 PhabricatorMailManagementSendTestWorkflow::execute(PhutilArgumentParser) called at [/src/parser/argument/PhutilArgumentParser.php:441]
#9 PhutilArgumentParser::parseWorkflowsFull(array) called at [/src/parser/argument/PhutilArgumentParser.php:333]
#10 PhutilArgumentParser::parseWorkflows(array) called at [/scripts/mail/manage_mail.php:21]

If we revert the commit 6011085b0fcd,

git checkout c5b13a6be3b7262c49635ceade437345a02de2cc

and do the same, the problem goes away:

Mail sent! You can view details by running this command:

phabricator/ $ ./bin/mail show-outbound --id 10219

Expected Behavior:
Can send any mail.

Phabricator Version:
phabricator 1459fb303769af0903733bfdf6d7129d82665814 (Tue, Jun 12)

Reproduction Steps:
(1) checkout master branch
(2) restart phd
(3) ./bin/mail send-test --to someone@somewhere.com --subject test


#2

Thanks, see https://secure.phabricator.com/D19494.


#3

The fix works. :clap: