Codeigniter: Override variable in auto-loaded config file -


i have following:

config/email.php

$config['protocol']  = 'smtp'; $config['smtp_host'] = "xxxxxx"; $config['smtp_user'] = "xxxxxx"; $config['smtp_pass'] = "xxxxxx"; $config['smtp_port'] = xx;    $config['wordwrap'] = true; $config['mailtype'] = 'html';  $config['charset']  = 'utf-8'; $config['newline'] = "\r\n";  


in cases, i'm sending html plain-text alternative emails. config works perfectly.

now in 1 special case, i'm wanting send plain-text email need override setting to:$config['mailtype'] = 'text';

how can that? tried specifying new config array , loading library again still sends html:

 $email_config = array(         'mailtype'  => 'text'  );   $this->load->library('email', $email_config); 

i think need call initialize when don't load config file.

$this->email->initialize($email_config); 

Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -