Could not connect to SMTP host

后端 未结 2 847
野趣味
野趣味 2020-12-06 11:00

SMTP Error: Could not connect to SMTP host. Message could not be sent.

Mailer Error: SMTP Error: Could not connect to SMTP host.

I c

2条回答
  •  情深已故
    2020-12-06 11:16

    You can enable debug mode with the SMTPDebug property, e.g.:

    $mail = new PHPMailer();
    // 1 = errors and messages
    // 2 = messages only
    $mail->SMTPDebug  = 2;
    

    Error messages will be echoed to screen.

    Update:

    A permission denied error message using fsockopen() suggests that the user PHP runs as is not allowed to open a socket. If you'd double-checked that there's no firewall, it's possible that's a SELinux problem :-?

提交回复
热议问题