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, 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
Unknown Object (File)
Feb 11 2024, 10:53 AM
Unknown Object (File)
Feb 3 2024, 8:42 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
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".