'465', $mail->SMTPSecure = 'ssl'" ."/> '465', $mail->SMTPSecure = 'ssl'" .">

Home  >  Article  >  Backend Development  >  What to do if there is an error in the php mail server

What to do if there is an error in the php mail server

藏色散人
藏色散人Original
2020-02-03 09:54:063069browse

What to do if there is an error in the php mail server

What should I do if there is an error in the php mail server? PHP sending email fails on the server?

PHP sends emails, the code is correct, the local execution is OK, but when it is executed on the server, it fails?

Recommended video tutorial: "php tutorial"

Cause

● SMTP server is written incorrectly

● The SMTP server port is occupied

Solution

● Go to the official website of the outgoing mailbox to see the configuration

● Do not use port 21, use port 465 instead , while using security protocols.

That is:

’SMTP_PORT’ => ‘465’ , $mail->SMTPSecure = ‘ssl’

The above is the detailed content of What to do if there is an error in the php mail server. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn