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
Unknown Object (File)
Thu, Aug 4, 4:05 AM
Unknown Object (File)
Fri, Jul 29, 4:19 AM
Unknown Object (File)
Thu, Jul 21, 12:38 PM
Unknown Object (File)
Jul 14 2022, 11:15 PM
Unknown Object (File)
Jul 11 2022, 12:04 PM
Unknown Object (File)
Jul 6 2022, 10:46 AM
Unknown Object (File)
Jul 4 2022, 5:08 AM
Unknown Object (File)
Jun 27 2022, 8:45 AM
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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

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