HomePhabricator

Don't set mail HTML bodies if there's no actual HTML body

Description

Don't set mail HTML bodies if there's no actual HTML body

Summary:
See https://discourse.phabricator-community.org/t/commit-6011085b0fcd-breaks-sending-certain-email/1571. Some mailers get upset if we setHTMLBody(...) with an empty string.

There's some possible argument they should be more graceful about this, but it's reasonably pretty ambiguous.

Only try to set the HTML body if we actually have a nonempty HTML body.

Test Plan:

  • Configured an "smtp" mailer.
  • Ran echo hi | ./bin/mail send-test --to someone@somewhere.com --subject test.
  • Before: error about empty message body.
  • After: no more message body error.

Reviewers: amckinley

Reviewed By: amckinley

Differential Revision: https://secure.phabricator.com/D19494

Details

Provenance
epriestleyAuthored on Jun 15 2018, 7:03 PM
epriestleyPushed on Jun 15 2018, 9:01 PM
Reviewer
amckinley
Differential Revision
D19494: Don't set mail HTML bodies if there's no actual HTML body
Parents
rP1459fb303769: Make re-running `rebuild-identities` a bit faster and add a little progress…
Branches
Unknown
Tags
Unknown
Build Status
Buildable 20424
Build 27737: Run Core Tests