Page MenuHomePhabricator

Update the SMTP (PHPMailer) adapter for the new mail API; remove "encoding" and "mailer"
ClosedPublic

Authored by epriestley on Jan 5 2019, 3:25 PM.
Tags
None
Referenced Files
F13095461: D19961.diff
Thu, Apr 25, 9:41 AM
Unknown Object (File)
Sat, Apr 20, 4:26 PM
Unknown Object (File)
Thu, Apr 11, 7:24 AM
Unknown Object (File)
Tue, Apr 9, 4:29 AM
Unknown Object (File)
Mon, Apr 1, 4:14 AM
Unknown Object (File)
Thu, Mar 28, 11:52 PM
Unknown Object (File)
Mar 5 2024, 1:21 PM
Unknown Object (File)
Feb 20 2024, 12:46 PM
Subscribers
None

Details

Summary

Ref T920. Ref T12404.

  • Update to the new "$message" API.
  • Remove "encoding". I believe "base64" is always the best value for this since we stopped seeing issues once we changed the default.
  • Remove "mailer". This is a legacy option that makes little sense given how configuration now works.
  • Rename to "SMTP". This doesn't affect users anymore since this mailer has been configured as smtp for about a year.
  • This does NOT add a timeout since the SMTP code is inside PHPMailer (see T12404).
Test Plan

Sent messages with many mail features via GMail SMTP and SendGrid SMTP.

Diff Detail

Repository
rP Phabricator
Branch
mfa9
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 21503
Build 29293: Run Core Tests
Build 29292: arc lint + arc unit

Event Timeline

amckinley added inline comments.
src/applications/metamta/adapter/PhabricatorMailSMTPAdapter.php
83

Nice.

144

Shouldn't we base64 encode this if we're telling PHPMailer that the type is base64 on line 146? Or does this work in some counter-intuitive nonsense way.

This revision is now accepted and ready to land.Jan 10 2019, 4:58 PM
src/applications/metamta/adapter/PhabricatorMailSMTPAdapter.php
144

The latter -- the base64 is "what format do you want this encoded as in the mail?", not "what format is this data actually encoded as right now".