Page MenuHomePhabricator

Update the "SES" and "sendmail" mailers for the new API; remove "encoding"
ClosedPublic

Authored by epriestley on Jan 14 2019, 5:02 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Dec 17, 8:40 AM
Unknown Object (File)
Wed, Dec 11, 2:51 PM
Unknown Object (File)
Tue, Dec 10, 5:24 PM
Unknown Object (File)
Sat, Dec 7, 9:51 AM
Unknown Object (File)
Sat, Dec 7, 6:05 AM
Unknown Object (File)
Sat, Dec 7, 3:01 AM
Unknown Object (File)
Wed, Nov 27, 8:19 AM
Unknown Object (File)
Nov 19 2024, 4:45 PM
Subscribers
None

Details

Summary

Ref T13222. Ref T920. This is the last of the upstream adapter updates.

Test Plan
  • Sent mail with SES.
  • Sent mail with "sendmail". I don't have sendmail actually configured to an upstream MTA so I'm not 100% sure this worked, but the sendmail binary didn't complain and almost all of the code is shared with SES, so I'm reasonably confident this actually works.

Diff Detail

Repository
rP Phabricator
Branch
mfa10
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 21557
Build 29379: Run Core Tests
Build 29378: arc lint + arc unit

Event Timeline

I definitely reviewed almost this exact same code, but I have completely lost it in the stack of email-related changes recently. If I recall, I complained about the unused variable, checking for truthiness instead of using strlen for all the fields that PHPMailer wants, and the base64 attachment encoding thing. The truthiness checks make sense now that all those properties are objects instead of bare strings.

externals/phpmailer/class.phpmailer-lite.php
98

Still an unused variable.

src/applications/metamta/adapter/PhabricatorMailSendmailAdapter.php
3

Hooray!

This revision is now accepted and ready to land.Jan 16 2019, 6:59 PM

Aha, this is what triggered my deja vu: D19959.

Don't tell anyone, but I copy/pasted all of these.

bwahaha

This revision was automatically updated to reflect the committed changes.
src/applications/metamta/adapter/PhabricatorMailSendmailAdapter.php
101–105

Oh, and I believe this ("..does NOT support..") wasn't right, the way to do it is just a little tricky (->AltBody).

Or maybe this was true when written, then we updated PHPMailerLite, then it became untrue?

In either case, we build HTML + Text mail now.