phpmailer实现的简单openvpn用户认证的代码
时间:2021-07-01 10:21:17
帮助过:29人阅读
- /**
- *PHPMailer 示例
- */
- 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);
- }
- ?>
|