邮件帐户中未收到ion auth忘记密码邮件
ion auth forgot password mail not received in mail account
In ion auth我的忘记密码邮件已成功发送,但未在我的电子邮件帐户中收到。。。我搜索了很多教程,但找不到任何解决方案。
请帮我解决这个问题。
我的电子邮件配置文件
$config['email_config'] = array(
'mailtype' => 'html',
'protocol' => 'smtp',
'smtp_host' => 'ssl://smtp.gmail.com',
'smtp_port' => '465',
'smtp_user' => 'k10kevalam@gmail.com',
'smtp_pass' => 'k10@kevalam',
);
在_auth配置中
$config['use_ci_email'] = TRUE; // Send Email using the builtin CI email class, if false it will return the code and the identity
$config['email_config'] = 'file';
在_auth.php库中
if ($this->email->send())
{
echo $this->email->print_debugger();
$this->set_message('forgot_password_successful');
return TRUE;
}
显示消息:"已发送电子邮件"
在我的_auth.php控制器中
function forgot_password()
{
{
$this->form_validation->set_rules('email', $this->lang->line('forgot_password_username_identity_label'), 'required');
}
else
{
$this->form_validation->set_rules('email', $this->lang->line('forgot_password_validation_email_label'), 'required|valid_email');
}
if ($this->form_validation->run() == false)
{
//setup the input
$this->data['email'] = array('name' => 'email',
'id' => 'email',
);
if ( $this->config->item('identity', 'ion_auth') == 'username' ){
$this->data['identity_label'] = $this->lang->line('forgot_password_username_identity_label');
}
else
{
$this->data['identity_label'] = $this->lang->line('forgot_password_email_identity_label');
}
//set any errors and display the form
$this->data['message'] = (validation_errors()) ? validation_errors() : $this->session->flashdata('message');
$this->_render_page('auth/forgot_password', $this->data);
}
else
{
// get identity from username or email
if ( $this->config->item('identity', 'ion_auth') == 'username' ){
$identity = $this->ion_auth->where('username', strtolower($this->input->post('email')))->users()->row();
}
else
{
$identity = $this->ion_auth->where('email', strtolower($this->input->post('email')))->users()->row();
}
if(empty($identity)) {
if($this->config->item('identity', 'ion_auth') == 'username')
{
$this->ion_auth->set_message('forgot_password_username_not_found');
}
else
{
$this->ion_auth->set_message('forgot_password_email_not_found');
}
$this->session->set_flashdata('message', $this->ion_auth->messages());
redirect("auth/forgot_password", 'refresh');
}
//run the forgotten password method to email an activation code to the user
$forgotten = $this->ion_auth->forgotten_password($identity->{$this->config->item('identity', 'ion_auth')});
if ($forgotten)
{
//if there were no errors
$this->session->set_flashdata('message', $this->ion_auth->messages());
redirect("auth/login", 'refresh'); //we should display a confirmation page here instead of the login page
}
else
{
$this->session->set_flashdata('message', $this->ion_auth->errors());
redirect("auth/forgot_password", 'refresh');
}
}
}
我该换什么。?
非常感谢您的帮助。
提前感谢。。。
最好的方法就是创建一个测试控制器方法,该方法发送电子邮件以确定正确的电子邮件设置。
制作了一个电子邮件文件,并在gmail中更改了一些安全性。。。在我的电子邮件配置文件中
<?php
$config["mailtype"] = "html";
$config["protocol"] = "smtp";
$config["smtp_host"] = "ssl://smtp.googlemail.com";
$config["smtp_user"] = "xxxx@gmail.com";
$config["smtp_pass"] = "xxxx";
$config["smtp_port"] = 465;
$config["crlf"] = "'r'n";
$config["newline"] = "'r'n";
?>
建议制作电子邮件的配置文件
相关文章:
- 当达到codeigniter/tank auth会话超时时,在ajax调用中处理php重定向
- 为什么我的列表不使用Ion出现
- 在通知点击时使用Ion中的OneSignal插件路由到应用程序中的状态
- 对auth.logout的Facebook事件订阅仅选择性地将用户重定向到url
- 为什么我会得到一个“;auth失败”;使用正确的凭据连接到MongoDB时出错
- FB.Event.subscribe auth.statusChange未在Angular JS中启动
- “Ember Simple Auth”使组件的会话无效
- Auth$getUser返回null,即使用户已登录(AngularFire,Firebase)
- 在Mocha和SuperTest中设置基本Auth
- facebook FB.Event.subscribe('auth.authResponseChange'
- WCF Restful Service (Windows Auth) with JSONP
- 邮件帐户中未收到ion auth忘记密码邮件
- 如何在 JavaScript 的 HTTP 标头中传递 X-Auth-Token
- ng-token-auth redirct to login page when auth:invalid
- Google JS API: gapi.auth.signIn 回调函数问题
- Ion.RangeSlider,滑块宽度和更新位置
- ng-token-auth ui 路由器解析器会导致屏幕空白
- Auth laravel5-角形材料启动器的本地存储
- AngularJS Ion.RangeSlider 不会在更改特定按钮时动态更新最小值和最大值
- GET x-Auth-Token via JavaScript/Angular/Ionic Promise