From 537f2eabee91db76b15b8d70fc3c66a7ccc8ee58 Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 16 Dec 2013 12:30:56 -0800 Subject: [PATCH] Make it harder to misconfigure `phpmailer.smtp-protocol` Summary: Until we implement an "enum" type for config, make this a bit harder to get wrong. A user entered "TLS", but the correct value is "tls". The documentation is consistent about this, but the behavior is sitll surprsing. Test Plan: eyeballed it Reviewers: btrahan Reviewed By: btrahan CC: aran Differential Revision: https://secure.phabricator.com/D7778 --- .../adapter/PhabricatorMailImplementationPHPMailerAdapter.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/applications/metamta/adapter/PhabricatorMailImplementationPHPMailerAdapter.php b/src/applications/metamta/adapter/PhabricatorMailImplementationPHPMailerAdapter.php index 6581e56753..3af3fbb1e0 100644 --- a/src/applications/metamta/adapter/PhabricatorMailImplementationPHPMailerAdapter.php +++ b/src/applications/metamta/adapter/PhabricatorMailImplementationPHPMailerAdapter.php @@ -33,6 +33,7 @@ final class PhabricatorMailImplementationPHPMailerAdapter $protocol = PhabricatorEnv::getEnvConfig('phpmailer.smtp-protocol'); if ($protocol) { + $protocol = phutil_utf8_strtolower($protocol); $this->mailer->SMTPSecure = $protocol; } } else if ($mailer == 'sendmail') {