Home > Article > Backend Development > Reasons why thinkphp failed to send email
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