Page MenuHomePhabricator

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

Authored by epriestley on Jun 15 2018, 7:06 PM.
Tags
None
Referenced Files
F15572775: D19494.id46618.diff
Mon, May 5, 5:40 PM
F15568587: D19494.id46619.diff
Sat, May 3, 6:14 AM
F15550519: D19494.id46619.diff
Sun, Apr 27, 12:08 PM
F15516564: D19494.id.diff
Fri, Apr 18, 7:43 PM
F15511883: D19494.diff
Thu, Apr 17, 6:04 AM
F15506845: D19494.id46619.diff
Tue, Apr 15, 2:34 PM
F15491705: D19494.id46619.diff
Sat, Apr 12, 6:39 AM
F15454836: D19494.diff
Mar 29 2025, 8:44 PM
Subscribers
None

Details

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.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable