ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
[TOC] ## demo test.php ``` <?php C('SMTP_HOST','smtp.163.com'); C('SMTP_PORT','25'); C('SMTP_USER','15726817105@163.com'); C('SMTP_PASS','a13757547812'); C('SMTP_NAME','cpj'); C('MAIL_REG_BODY','mail.html'); //内容是文档路径 C('MAIL_REG_TITLE',"title"); $mail = new Mail(); $arr =[ 'to'=>'260083304@qq.com', 'name'=>'cpj', //模版内容,可自己扩充 ]; $res = $mail->sendRegMail($arr); if($res!==true){ die("发送失败"); } die("发送成功"); ``` mail.html ``` <body> <h1>欢迎注册</h1> <p>你是 {name} 用户,恭喜你</p> </body> ```