Cannot set PHPMailer option SMTPAutoTLS to false with Framadate
The config option "smtp_options" needs a paramter (e.g. autotls) to enable/disable SMTPAutoTLS in PHPMailer. The default for SMTPAutoTLS is true, so when dumping mails from Framadate into a local MTA (localhost:25, no encryption required) PHPMailer always tries to issue a StartTLS handshake (SMTPAutoTLS defaults to true) which fails on localhost connections against an MTA.
Thus, a slight adaptation is required in config.php and MailService.php to amend this:
diff --git a/app/classes/Framadate/Services/MailService.php b/app/classes/Framadate/Services/MailService.php
index 68d3b7b..5c16c96 100644
--- a/app/classes/Framadate/Services/MailService.php
+++ b/app/classes/Framadate/Services/MailService.php
@@ -122,6 +122,7 @@ class MailService {
'username' => 'Username',
'password' => 'Password',
'secure' => 'SMTPSecure',
+ 'autotls' => 'SMTPAutoTLS',
'port' => 'Port',
];
diff --git a/app/inc/config.test.php b/app/inc/config.test.php
index 1f883da..6543d0e 100644
--- a/app/inc/config.test.php
+++ b/app/inc/config.test.php
@@ -104,6 +104,7 @@ $config = [
'password' => '', // SMTP password
'secure' => '', // Enable encryption (false, tls or ssl)
'port' => 25, // TCP port to connect to
+ 'autotls' => false, // Don't try StartTLS even if MTA supports it
'use_sendmail' => false, // If you use a local email relay / mail server
],
/* home */
Edited by Mike Gabriel