Welcome Guest, Not a member yet? Register   Sign In
CI does't see the configuration email.php
#1

[eluser]mitring[/eluser]
Hi,

I have problem with configuration a email class:
myfile: application\config\email.php

Code:
$config['mailtype'] = 'html';
$config['charset'] = 'utf-8';
$config['newline'] = '\r\n';

//$config['protocol'] = 'smtp';

// konfiguracja poczty
$config = array(
    'protocol' => 'smtp',
    'smtp_host' => 'serwer.com.pl',
    'smtp_user' => '[email protected]',
    'smtp_pass' => 'tajnehaslo',
    'smtp_port' => 587,

);

and now:
Code:
var_dump($this->email->mailtype);
return text :|

I tried Email.php / email.php Sad

CI: 1.7.2
WAMP: 2.0
Win7 Pro x64

Best regards
Peter
#2

[eluser]slowgary[/eluser]
Hi Peter,

When you assign $config = array(), you wipe out the previous value of $config. Also, you'll need to call the initialization function somewhere...
Code:
$this->email->initialize($config);

I recommend you read the user guide to better understand how CodeIgniter works...
http://ellislab.com/codeigniter/user-gui...email.html
http://ellislab.com/codeigniter/user-gui...onfig.html

Also, for better answers to your questions, try posting a more complete code sample next time.

I hope this helps!
#3

[eluser]mitring[/eluser]
Thanks, your answer is correctSmile my mistake.

Thanks

Reg
Peter




Theme © iAndrew 2016 - Forum software by © MyBB