Welcome Guest, Not a member yet? Register   Sign In
email send problem
#1

[eluser]shivi[/eluser]
i loaded the library email in autoload file but not work any help please

Code:
public function forget_password_validation(){
  $key = md5(uniqid());
  $this->form_validation->set_rules('email','Email','required|xss_clean|trim|valid_email');
  if($this->form_validation->run()){
   $this->email->from('[email protected]','name');
   $this->email->to($this->input->post('email'));
   $this->email->subject('tempory password');
   $message = "Now you can change your password using your tempory password ";
   $message .= "Click on<a href='".base_url()."main/forget_password_validation/$key'>tempory password</a> to complete your change password request";
   $this->email->message($message);
   $this->load->model('Forget_password_email_check');
   if($this->Forget_password_email_check->get_email_check($key)){
    if($this->email->send()){
     $this->load->view('password_change_success');
    }
    return true;
   }else{
    echo "fail email sending try again ";
    echo anchor('main/home','Go to home page');
    return false;
   }
  
  }else{
   $this->forget_pass();
  }
}

it always give me message fail email sinding try again . where is my mistake thanks very much
#2

[eluser]DarkManX[/eluser]
you running this on your local server?
ps: as i told, i would try to learn php and debug first, before starting work with a framework....
#3

[eluser]shivi[/eluser]
yes but it must send me the mail on my gmail account or i have to change something ?
#4

[eluser]DarkManX[/eluser]
thats what i mean, try to get used to php on its own. its because you have no local mailserver, so it wont send anything, thats a rly common mistake, which you could solve just google...
#5

[eluser]shivi[/eluser]
ok i will try and after will come back here to know you thanks
#6

[eluser]shivi[/eluser]
okkk now email sending perfect but the problem is when i check my account there is n0thing . when i try to change my password it show me the message my email was sent success .
#7

[eluser]DarkManX[/eluser]
you know how to get data from the database?
you know how to dump vars? (if not -> var_dump())

they try to figure out your mistakes by your self, you cant just do something, try, doesnt work, post in forum! if you want other ppl do your job, just pay them!
#8

[eluser]shivi[/eluser]
hey moderate your language. if you do not want to give any help you are not obliged ok but do not use this way of speaking is very annoying. hoped that you understand .
#9

[eluser]DarkManX[/eluser]
i hoped you understood now to handle your problems. learn to debug, use google to find solutions and study tutorials and books. ofc you dont have to do that if you dont want, but then pay the ppl that did the afford of learning stuff before to solve your problems.
#10

[eluser]shivi[/eluser]
i resolved everything thanks very much for your useful help




Theme © iAndrew 2016 - Forum software by © MyBB