Welcome Guest, Not a member yet? Register   Sign In
Email sending
#2

[eluser]mi6crazyheart[/eluser]
Just made a small change. Try this...
Code:
class Reg_controller extends Controller{
  function index(){
      $this->load->helper(array(“form”,“html”,“url”,‘email’));
      $this->load->library(‘form_validation’);
      
      $this->load->language(‘registration’);
      $this->load->view(‘tocheck’);
      $this->load->database();
      $this->load->model(‘registermodel’);
      $this->form_validation->set_rules(‘entry_date’, ‘Date ‘, ‘required’);
      if ($this->form_validation->run() == true){
        if($this->input->post(‘utype’)==‘R’){
            $reslt = $this->registermodel->insert_register();
          if($reslt==1){  
              $this->load->library(‘email’);
              $this->email->from(‘[email protected]’,‘Our site’);
              $this->email->to(“[email protected]”);      
              $this->email->subject(‘Email Test’);
              $this->email->message(‘Testing the email class in codeIgniter.’);
              $this->email->send();            

              echo “[removed]
                  alert(‘New user is added!..’);
                [removed]”;
          }
        }
      }
  }

}


Messages In This Thread
Email sending - by El Forum - 07-30-2010, 11:29 PM
Email sending - by El Forum - 07-31-2010, 12:54 AM



Theme © iAndrew 2016 - Forum software by © MyBB