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.

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
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

epriestley created this revision.Jan 5 2019, 3:25 PM
epriestley requested review of this revision.Jan 5 2019, 3:27 PM
amckinley accepted this revision.Jan 10 2019, 4:58 PM
amckinley added inline comments.
src/applications/metamta/adapter/PhabricatorMailSMTPAdapter.php
84

Nice.

145

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
epriestley added inline comments.Jan 14 2019, 10:14 PM
src/applications/metamta/adapter/PhabricatorMailSMTPAdapter.php
145

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".

This revision was automatically updated to reflect the committed changes.