tags:

views:

89

answers:

1
SMTP -> FROM SERVER:220-serer.smarthostbd.com ESMTP Exim 4.69 #1 Wed, 22 Sep 2010 08:06:56 +0000 220-We do not authorize the use of this system to transport unsolicited, 220 and/or bulk e-mail.
SMTP -> FROM SERVER: 250-serer.smarthostbd.com Hello localhost [180.234.12.144] 250-SIZE 52428800 250-PIPELINING 250-AUTH PLAIN LOGIN 250-STARTTLS 250 HELP
SMTP -> FROM SERVER:250 OK
SMTP -> FROM SERVER:250 Accepted
SMTP -> FROM SERVER:354 Enter message, ending with "." on a line by itself
SMTP -> FROM SERVER:250 OK id=1OyKLz-0005AA-IU 

I am working in CodeIgniter

My code work but give me this kinds of error but why?

function resetPassword()
   {
        if($this->session->userdata('logged_in'))
        {
            $this->layout->setFlashMsg('error_msg','You are already logged in.');
            redirect(base_url());
        }
        $this->viewData['page_title'] = "Reset Password!";
        $this->layout->loadJS('jquery.validate.min.js');
                $this->load->library('form_validation');
        if(isset($_POST) && !empty($_POST)){
            $this->form_validation->set_rules('email', 'Email', 'required|valid_email|callback_checkEmailExistance|xss_clean|trim');
            if ($this->form_validation->run() == FALSE)
            {
                $this->layout->view('user/reset',$this->viewData);
            }else{
                $email = $this->input->post('email', TRUE);
                if($this->_resetRequest($email))
                {
                    $this->layout->setFlashMsg('success_msg','Please check your email');
                    redirect(base_url());
                }else{
                    $this->layout->setFlashMsg('error_msg', 'Invalid Credential.');
                    $this->layout->view('user/reset',$this->viewData);
                }
            }
        }else
            $this->layout->view('user/reset',$this->viewData);
    }

   /**
    * Reset Request Function
    * It is a private function and called when some one try to reset his/her password
    * it will just send an email with a verirication code to reset his/her password
    */
    private function _resetRequest($email)
    {
       $code = $this->users->savePasswordResetRequest($email);
       $CI = &get_instance();
       $this->load->helper('phpmailer');

       $subject='Password Reset';
       $body = "Hi,\n\n
           You have requested to complete our lost password procedure. Please click on the link below and you will be able to choose a new password for your account:\n
            {unwrap}".site_url()."user/resetPasswordVerify/".$code."{/unwrap}\n
                Sincerely,
                ".$CI->config->config['SMTP_from_name'];

       send_email($email, $subject, $body, false, true);
    }

    /**
    * Form Validation Rules for SignUp Function
    */
    private function _formValidationRules()
    {
        $this->load->library('form_validation');
        $this->form_validation->set_error_delimiters('<label class="error">', '</label>');

        $this->form_validation->set_rules('password', 'Password', 'required|xss_clean|trim|min_length[5]');
        $this->form_validation->set_rules('password_again', 'Password Confirmation', 'required|matches[password]|xss_clean|trim');
        $this->form_validation->set_rules('email', 'Email', 'required|callback_checkDuplicateEmailForRegistration|valid_email|xss_clean|trim');
    }

    /**
    * Sending Welcome Email to Verify email address
    */
   private function _sendWelcomeEmail($email, $key)
   {
       $CI = &get_instance();

       $this->load->helper('phpmailer');

       $subject='Email Verification Code';

       $body = "Hi,

Thank you for registering to our network!

Please verify your email address:
".site_url()."user/verifyEmail/".$key."


Sincerely,
".$CI->config->config['SMTP_from_name'];

       send_email($email, $subject, $body, false, true);
   }
A: 

Use Ion Auth instead? It works already.

Phil Sturgeon