使用PHP怎么实现一个发送邮件确认验证注册功能-创新互联
这篇文章将为大家详细讲解有关使用PHP怎么实现一个发送邮件确认验证注册功能,文章内容质量较高,因此小编分享给大家做个参考,希望大家阅读完这篇文章后对相关知识有一定的了解。
创新互联建站专注于企业网络营销推广、网站重做改版、旌德网站定制设计、自适应品牌网站建设、html5、电子商务商城网站建设、集团公司官网建设、外贸网站制作、高端网站制作、响应式网页设计等建站业务,价格优惠性价比高,为旌德等各大城市提供网站开发制作服务。类库:

require "class.phpmailer.php";
require "class.smtp.php";
class PHP_Mailer
{
protected $mail;
public function __construct()
{
$mail = new PHPMailer;
$mail->SMTPDebug = 3;
$mail->isSMTP();
$mail->SMTPAuth = true;
$mail->isHTML(true);
$CI =& get_instance();
$CI->load->config('email_config');
$email = $CI->config->item('email');
foreach ($email as $key => $value) {
$mail->$key = $value;
}
$this->mail = $mail;
}
public function check_user($email,$nick,$txt,$id)
{
$this->mail->FromName = '表白墙';
$this->mail->addAddress("$email"); // Add a recipient
$this->mail->addReplyTo('test@test.com', '表白墙反馈');
$this->mail->Subject = '表白墙通知';
$this->mail->CharSet = "UTF-8";
$this->mail->Body = <<你好:测试邮件
body;
$this->mail->AltBody = <<mail->send()) { returntrue; } elsereturnfalse; } } 调用
$this->load->library('email/php_mailer');
$result = $this->php_mailer->check_user('297538600@qq.com', 'aaa', '$row->txt', '$row->id');
if ($result == true) {
//更新状态
echo 'ok';
}关于使用PHP怎么实现一个发送邮件确认验证注册功能就分享到这里了,希望以上内容可以对大家有一定的帮助,可以学到更多知识。如果觉得文章不错,可以把它分享出去让更多的人看到。
当前题目:使用PHP怎么实现一个发送邮件确认验证注册功能-创新互联
文章链接:http://jxruijie.cn/article/cccjeg.html
