Welcome Guest, Not a member yet? Register   Sign In
Email configuration doesn't work?

I want to apologize for double posting this, but I needed to get a bit more visibility on this issue.

As far as I can tell I have set up the email configuration settings correctly, but the configuration changes seem to not be taking hold.

Please see this thread:

If you can notice anything I am doing incorrectly, please let me know. I have not fully concluded this to be a bug as of yet, coupled with no one else having the issue.

Issue Resolved. The configuration needs to have a capital "E". As in, "Email.php".

This should be better documented as even the guide shows a lower case, as well as every other configuration file being completely lower case.

Quote:Setting Email Preferences in a Config File
If you prefer not to set preferences using the above method, you can instead put them into a config file. Simply create a new file called the email.php, add the $config array in that file. Then save the file at config/email.php and it will be used automatically. You will NOT need to use the $this->email->initialize() function if you save your preferences in a config file.

Please update the documentation accordingly.

[eluser]Derek Allard[/eluser]
if its not (I haven't looked) it should be case insensitive. What version of PHP you using drewbee?

Yeah, I thought it was weird too. As soon as I renamed the file, everything worked as expected.

PHP 5.2.6

Did you have a chance to look at this?

[eluser]Derek Allard[/eluser]
No, it was a long weekend, but even if it weren't, I'd love your help tracking this down. Are you able to identify in the code why this may be happening? Any similar reports on these forums of bug tracker? Anything you can do to make my life easier will result in this getting fixed faster Wink

Thanks Drewbee.

Sure, I can take a look. With that being said, I am looking for or under the assumption that it is suppose to be case insensitive correct?

One other known thread.


We check Upper and Lower case class names. The original core library is Email.php, so the first iteration of the array is used "Email".

function _ci_load_class:

Line 752:
foreach (array(ucfirst($class), strtolower($class)) as $class)

Since we are in our first iteration, we pass the value of "Email" as the $class variable and return the value, exiting the loop, not giving our lower case counterpart the time of day.

Line 829:
return $this->_ci_init_class($class, '', $params, $object_name);

function _ci_init_class:

Line 865 - 868:
if (file_exists(APPPATH.'config/'.$class.EXT))
Nope: APPPATH.'config/Email.php' does not exist.

Among all of that, the session class seems to accept my configuration file with no issues (lower case). One difference is that I do have that extended though, which the *stuff* in the subclass loader part of the loader method are inheritable the same.

I'm having the same issue. If I have the config file "email.php" with the lowercase "e" it doesn't load when I load the Email library. If I change the config file to Email.php it then loads.

As a test I put the following line in the email config file:
log_message('debug',__FILE__." email conf loaded");

It only shows in the log when the filename is Email.php.
(I rename it so there only exists one config at a time.)


The server I was testing this on, had a svn version of CI right before the 1.7.0 release.

After updating to released 1.7.0 I cannot reproduce the problem anymore.

Theme © iAndrew 2016 - Forum software by © MyBB