SMTP connect() failed - STARTTLS
Hi All,
I'm triyng to use email notifications.
My SMTP configuration is based on STARTTLS protocole.
This lines are good for this ?
'secure' => 'tls', // Enable encryption (false, tls or ssl)
'port' => 587, // TCP port to connect to
Here is my configuration file, framadate/app/inc/config.php
// Config
$config = [
/* general config */
'use_smtp' => true, // use email for polls creation/modification/responses notification
'smtp_options' => [
'host' => 'smtp.mydomain.com', // SMTP server (you could add many servers (main and backup for example) : use ";" like separator
'auth' => true, // Enable SMTP authentication
'username' => 'user@mydomain.com', // SMTP username
'password' => 'mypassword', // SMTP password
'secure' => 'tls', // Enable encryption (false, tls or ssl)
'port' => 587, // TCP port to connect to
],
Here is my nginx error logs,
2022/01/30 20:21:45 [error] 109961#109961: *116 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught PHPMailer\PHPMailer\Exception: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting in framadate/vendor/phpmailer/phpmailer/src/PHPMailer.php:1982
Stack trace:
#0 framadate/vendor/phpmailer/phpmailer/src/PHPMailer.php(1653): PHPMailer\PHPMailer\PHPMailer->smtpSend()
#1 framadate/vendor/phpmailer/phpmailer/src/PHPMailer.php(1491): PHPMailer\PHPMailer\PHPMailer->postSend()
#2 framadate/app/classes/Framadate/Services/MailService.php(67): PHPMailer\PHPMailer\PHPMailer->send()
#3 framadate/create_classic_poll.php(86): Framadate\Services\MailService->send()
#4 {main}
thrown in framadate/vendor/phpmailer/phpmailer/src/PHPMailer.php on line 1982" while reading response header from upstream, client: 192.168.10.30, server: www.mydomain.com, request: "POST /create_classic_poll.php HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm.sock:", host: "www.mydomain.com", referrer: "https://www.mydomain.com/"
Thanks a lot