[eluser]skibum001[/eluser]
Hi,
I couldn't find this problem listed anywhere else so hopefully it can be answered here.
I'm trying to use the email class from within a controller (pretty sure that the code is correct here).
Code:
$this->load->library('email');
$this->email->clear();
$this->email->from('no-reply@***.com', 'Booking Confirmation');
$this->email->to($bm->getEmail());
$this->email->bcc('info@***.com');
$this->email->subject('Email Test');
$this->email->message('Testing the email class.');
$this->email->send();
Problem is, I get an error Fatal error: Cannot access private property Place_model::$email in C:\web\system\application\libraries\Model.php on line 69
It looks like there is a referencing error somewhere EG CI sees $this->email as belonging to a model, not the super object. Many of my models have private $email atributes.
Can anyone help out here please? I'm using CI 1.6 but get the same error (Model line 68 on CI 1.7)