Quantcast
Channel: CodeIgniter Forums - All Forums
Viewing all articles
Browse latest Browse all 14343

Message: Call to a member function email->from() on string

$
0
0
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@gmail.com', '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...

Viewing all articles
Browse latest Browse all 14343

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>