-1
2017-09-19 08:09:53 SMTP ERROR: Failed to connect to server: (0)
SMTP connect() failed. 

https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

Message could not be sent.Mailer Error: SMTP connect() failed.

https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting.

The above is the error I got.

siva
  • 315
  • 2
  • 11
  • Your configuration might be wrong. [https://stackoverflow.com/questions/36351817/phpmailer-smtp-error-failed-to-connect-to-server](https://stackoverflow.com/questions/36351817/phpmailer-smtp-error-failed-to-connect-to-server) – siva Sep 19 '17 at 08:12
  • 2
    People might need more information here. Maybe the configuration you are using – kimy82 Sep 19 '17 at 08:29
  • port = 465 , $mail->isHTML(true) in php.ini i configured everything and uncommented what all needed. – Goutham Ggs Sep 19 '17 at 08:41
  • Maximum execution time of 30 seconds exceeded in C:\xampp\htdocs\gautam\vendor\phpmailer\phpmailer\src\SMTP.php on line 1115. This is error iam getting now and my timeout is set to 300. – Goutham Ggs Sep 19 '17 at 08:42

1 Answers1

1

The error says you are trying to connect to a server and the connection to the network socket is failing. In order you should check:

  1. Are you connecting to the right server?
  2. Is it running an SMTP server?
  3. Is there a firewall that is configured to reject your connection request on the server?
  4. Is there a firewall that is rejecting your connection request in between you and the server?
Chris Travers
  • 25,424
  • 6
  • 65
  • 182