Hi, I have installed ispconfig , webmail is working . But when i am trying to send email from phpmailer.. i got : Code: PHPMailer\PHPMailer\Exception Object ( [message:protected] => SMTP Error: Could not connect to SMTP host. [string:Exception:private] => [code:protected] => 0 [file:protected] => /var/www/clients/client1/web2/web/vendor/phpmailer/phpmailer/src/PHPMailer.php [line:protected] => 2146 [trace:Exception:private] => Array ( [0] => Array ( [file] => /var/www/clients/client1/web2/web/vendor/phpmailer/phpmailer/src/PHPMailer.php [line] => 1970 [function] => smtpConnect [class] => PHPMailer\PHPMailer\PHPMailer [type] => -> ) Here is my server data: Code: No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.3 LTS Release: 20.04 Codename: focal Code: PHP 7.4.25 (cli) (built: Oct 22 2021 12:34:33) ( NTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies with Zend OPcache v7.4.25, Copyright (c), by Zend Technologies
I have installed ispconfig based on url https://www.howtoforge.com/ispconfig-autoinstall-debian-ubuntu/ My smtp host is mail.ddcart.com , smtp port is 25..
Test the connection via telnet, and if that works, see if there are any errors in the site error.log.
I have tested debug on phpmailer , and i got this : i am set on phpmailer : $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; $mail->Host = 'smtp.gmail.com'; $mail->Port = 587; and got result below : Code: 2021-11-13 04:58:51 SERVER -> CLIENT: 220 server3.appindowebcity.com ESMTP Postfix (Ubuntu) 2021-11-13 04:58:51 CLIENT -> SERVER: EHLO localhost 2021-11-13 04:59:13 SERVER -> CLIENT: 2021-11-13 04:59:13 SMTP ERROR: EHLO command failed: 2021-11-13 04:59:13 SMTP NOTICE: EOF caught while checking if connected SMTP Error: Could not connect to SMTP host. SMTP Error: Could not connect to SMTP host. Message could not be sent. Mailer Error: SMTP Error: Could not connect to SMTP host.
I mean phpmailer config is : Code: $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; $mail->Host = 'mail.ddcart.com'; $mail->Port = 587; and got result : Code: 2021-11-13 04:58:51 SERVER -> CLIENT: 220 server3.appindowebcity.com ESMTP Postfix (Ubuntu) 2021-11-13 04:58:51 CLIENT -> SERVER: EHLO localhost 2021-11-13 04:59:13 SERVER -> CLIENT: 2021-11-13 04:59:13 SMTP ERROR: EHLO command failed: 2021-11-13 04:59:13 SMTP NOTICE: EOF caught while checking if connected SMTP Error: Could not connect to SMTP host. SMTP Error: Could not connect to SMTP host. Message could not be sent. Mailer Error: SMTP Error: Could not connect to SMTP host.