Now everyone has countless accounts and passwords, which cannot be remembered. The principle is to complete authentication through the mail server pop service, or use SMTP, the addition of SSL has enhanced security. now everyone has countless accounts and passwords, which is hard to remember. The principle is that the authentication is completed through the pop service of the mail server. you can also use SMTP and add SSL to improve security; this eliminates the trouble of setting User/Password. it is suitable for scenarios where you have your own email server and require PHPMailer. google
PHP code
The code is as follows:
Require_once ('class. phpmailer. php ');
Require_once ('class. pop3.php ');
$ Username = getenv ('Username ');
$ Password = getenv ('password ');
$ Pop = new POP3 ();
$ Auth = $ pop-> Authorise ('your .mailserver.com ', 110, 30, "$ username", "$ password", 1 );
If ($ auth ){
# Echo OK;
Exit (0 );
} Else {
# Echo "FAIL ";
Exit (255 );
}
?>
Save as auth_user.php and set it to executable
Server. conf directly
Auth-user-pass-verify auth_user.php via-env