• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Access config.php settings in email.php?

Hi there,

I have two config files.

config.php (code igniters core config)

and email.php (autoloaded by the email class when it is used)

What i am wanting to do is.

In config.php have
$config['env'] = 'hailwood_dev';

then in email.php have
if($config['env'] == 'hailwood_dev'){
    //email variables like smtp server to do with localhost
    } elseif($config['env'] == 'production'){
    //email variables like smtp server to do with production
But this is not having any effect (im guessing as $config['env'] does not have those values).

How can I access this value?

PHP commands still work, so you could try at the top of your email.php

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.