예제 #1
0
파일: mail.php 프로젝트: RenzcPHP/3dproduct
 /**
  * 邮箱验证
  * @param int $user_id
  * @param string $email
  * @param string $token 找回密码加密串
  */
 public static function check_register($uid, $email, $lastname, $key)
 {
     $mail_type = 'register_mail_active';
     $to_email = $email;
     $from_email = '';
     $expire = date('Y-m-d H:i', time() + Kohana::config('password.time'));
     $check_url = route::action('check_register') . "user/reg_success/?key=" . $key . "&id=" . $uid . "&u=" . $lastname . "&e=" . $email;
     $check_link = '<a href="' . $check_url . '" target="_blank">' . $check_url . '</a>';
     $title_param = array();
     $content_param = array('{username}' => $lastname, '{email}' => $email, '{expire}' => $expire, '{url}' => $check_url, '{url_link}' => $check_link);
     self::send_mail(1, $mail_type, $to_email, $from_email, $title_param, $content_param);
 }