Home  >  Article  >  Backend Development  >  Reasons why thinkphp failed to send email

Reasons why thinkphp failed to send email

高洛峰
高洛峰Original
2016-11-03 16:50:361922browse

When using phpmailer, the connection fails. The code has been packaged by others and there is no problem. The possible reasons are as follows.
qq prompt: SMTP server error: mail from address must be same as authorization user
163 prompt: SMTP connect error and the like

First, both of the php.ini must be opened. In fact, many people open them
;extension=php_sockets.dll
;extension=php_openssl.dll


Second,
$mail->Password = '************'; //Sender's email address in the code Password

This is not an email password, it is an independent management password - it is the password that manages the SMTP protocol (authorization code or independent management password). It is an independent management password that must be filled in when opening SMTP in 163 and QQ mailboxes. This is it. Password


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