質問

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.

役に立ちましたか?

解決

Change:

$mail->Port       = 465;

To:

$mail->Port       = 587;

For tls, 587 port is used.

他のヒント

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.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top