ион авторизация забыл пароль почта не получена в почтовом аккаунте


В ion auth моя почта с забытым паролем успешно отправлена, но не получена в моей учетной записи электронной почты... Я искал много учебных пособий, но не могу найти никакого решения.

Пожалуйста, помогите мне решить эту проблему.

Мой конфигурационный файл электронной почты

$config['email_config'] = array(
    'mailtype' => 'html',
    'protocol' => 'smtp',

    'smtp_host' => 'ssl://smtp.gmail.com',
    'smtp_port' => '465',
    'smtp_user' => '[email protected]',
    'smtp_pass' => 'k10@kevalam',

);
в конфигурации ion_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';

В ion_auth.php библиотека

if ($this->email->send())
		{
             echo $this->email->print_debugger();
             $this->set_message('forgot_password_successful');
	   		return TRUE;
        }

Отобразить сообщение: "отправлено электронное письмо"

В моем ion_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');
			}
		}
	}

Что я должен изменить.?

Мы Будем Признательны За Вашу Помощь.

Заранее благодарю...

Author: Bhavin Shah, 2015-02-13

2 answers

Лучше всего просто создать метод контроллера тестирования, который отправляет электронное письмо для определения правильных настроек электронной почты.

 0
Author: Ben Edmunds, 2015-02-13 14:20:33

Создал один файл электронной почты и изменил некоторые меры безопасности в gmail... в моем файле конфигурации электронной почты

<?php
$config["mailtype"] = "html";
$config["protocol"] = "smtp";
$config["smtp_host"] = "ssl://smtp.googlemail.com";
$config["smtp_user"] = "[email protected]";
$config["smtp_pass"] = "xxxx";
$config["smtp_port"] = 465;
$config["crlf"] = "\r\n";
$config["newline"] = "\r\n";
?>

Предложите создать конфигурационный файл для электронной почты

 0
Author: Bhavin Shah, 2015-02-14 05:52:04