Message: Call to a member function email->from() on string |
Please help...
I have 2 controllers first controller is home and my sendemail method is working and no problem at all but when I copy the same method to user controller it keeps me getting an error "Message: Call to a member function email->from() on string" heres my method... public function sendEmail($email,$link){ $message = "Hi" $subject = "hello message"; $this->load->library('email'); $this->load->helper(array('email')); $this->email->from('[email protected]', 'Email'); $this->email->to($email); $this->email->subject($subject); $this->email->message($message); $this->email->set_mailtype("html"); if($this->email->send()) return true; else return false; } I am looking forward to your positive response thank you so much... |
Messages In This Thread |
Message: Call to a member function email->from() on string - by kylmiko - 04-05-2018, 08:00 AM
RE: Message: Call to a member function email->from() on string - by php_rocs - 04-05-2018, 09:56 AM
RE: Message: Call to a member function email->from() on string - by dave friend - 04-05-2018, 10:01 AM
RE: Message: Call to a member function email->from() on string - by php_rocs - 04-05-2018, 10:24 AM
RE: Message: Call to a member function email->from() on string - by dave friend - 04-05-2018, 12:05 PM
RE: Message: Call to a member function email->from() on string - by kylmiko - 04-09-2018, 07:35 PM
RE: Message: Call to a member function email->from() on string - by Paradinight - 04-05-2018, 11:52 AM
RE: Message: Call to a member function email->from() on string - by php_rocs - 04-05-2018, 01:41 PM
RE: Message: Call to a member function email->from() on string - by InsiteFX - 04-10-2018, 03:47 AM
|