Welcome Guest, Not a member yet? Register   Sign In
Message: Call to a member function email->from() on string
#1

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...
Reply


Messages In This Thread
Message: Call to a member function email->from() on string - by kylmiko - 04-05-2018, 08:00 AM



Theme © iAndrew 2016 - Forum software by © MyBB