Welcome Guest, Not a member yet? Register   Sign In
Problem with using email-lib in own lib
#1

[eluser]grolle[/eluser]
Hi,

I want to use the email-library in my own library, but I get the following error:
Code:
A PHP Error was encountered
Severity: Notice
Message: Undefined property: Auth::$email
Filename: libraries/Auth.php
Line Number: 52

Fatal error: Call to a member function from() on a non-object in C:\xampplite\htdocs\codeigniter\application\libraries\Auth.php on line 52

This is line 52: $this->email->from(SGS_APPNAME, SGS_EMAIL);
I've loaded the lib with: $this->CI->load->library('email');
The encrypt lib works in this way.

Whats wrong?

Best regards ...
#2

[eluser]bretticus[/eluser]
Your email library (according to you) is accessed from your library under $this->CI. Have you tried calling the email library via $this->CI->email->from(SGS_APPNAME, SGS_EMAIL) yet?
#3

[eluser]grolle[/eluser]
:-) Worx!




Theme © iAndrew 2016 - Forum software by © MyBB