Reputation: 1868
This is my configuration
$mail->isSMTP();
$mail->SMTPAuth = true;
$mail->SMTPSecure = "tls";
$mail->Host = "gator4102.hostgator.com";
$mail->Port = 465;
$mail->Username = '[email protected]';
$mail->Password ='jyghvbjyhj';
It throws following error
SMTP -> ERROR: HELO not accepted from server:
SMTP -> NOTICE: EOF caught while checking if connectedLanguage string failed to load: tls
Mail gets delivered though sometimes. Please help.
Upvotes: 2
Views: 4568
Reputation: 5238
If you get response from server, it's already good enough. This means that you connect to server successfully.
You are probably trying to connect to the port on which another server application is listening. First, check again that you connect to port on which SMTP server is listening and waiting for TLS connection. Try to connect to another server to locate problem. Also, you can try another PHP library.
Upvotes: 0
Reputation: 132
If you are using
$mail->SMTPSecure = "tls";
Then your setting should be as following :
$mail->IsSMTP();
$mail->SMTPAuth = true;
$mail->SMTPSecure = "tls";
$mail->Host = "gator4102.hostgator.com";
$mail->Port = 587;
$mail->Username = "[email protected]";
$mail->Password = "yourpassword";
Upvotes: 1
Reputation: 1464
Change:
$mail->Port = 465;
To:
$mail->Port = 587;
For tls, 587 port is used.
Upvotes: 4