SMTP ERROR: Failed to connect to server – with gmail ...
wordpress.org › support › topicFeb 19, 2020 · Type of Encryption: SSL/TLS. Porta SMTP: 587. Autenticazione SMTP: yes. SMTP Username: my gmail address. Password SMTP: my gmail password. But when i try to send the email test appaired this messagge: SMTP ERROR: Failed to connect to server: Connection refused (111)SMTP connect () failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting.
php - PHPMailer, SMTP connect() failed error with Gmail ...
stackoverflow.com › questions › 25924651Sep 20, 2014 · But when i upload to my host i get the error SMTP connect() failed. Here is my code: $m = new PHPMailer; $m->isSMTP(); $m->SMTPAuth = true; $m->Host = "smtp.gmail.com"; $m->Username = "mymail@gmail.com"; $m->Password = "mypass"; $m->SMTPSecure = "ssl"; $m->Port = "465"; $m->isHTML(); $m->Subject = "Hello world"; $m->Body = "Some content"; $m->FromName = "Contact"; $m->addAddress('mymail@gmail.com', 'Test');