Question

This is my configuration

$mail->isSMTP();
$mail->SMTPAuth   = true;
$mail->SMTPSecure = "tls";
$mail->Host       = "gator4102.hostgator.com";
$mail->Port       = 465;
$mail->Username   = 'test@some.com';
$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.

Was it helpful?

Solution

Change:

$mail->Port       = 465;

To:

$mail->Port       = 587;

For tls, 587 port is used.

OTHER TIPS

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   = "yourusername@abc.com";
$mail->Password   = "yourpassword"; 

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top