Today I experimented with the email class in CodeIgniter. I have saved my email $config in `config/email.php` as per the documentation. And then I just use the email class as normal. So is it something like this:  

**config/email.php:**

```
<?php
    $config = Array(
        'protocol' => 'smtp',
        'smtp_host' => 'ssl://smtp.gmail.com',
        'smtp_port' => 465,
        'smtp_user' => '******',
        'smtp_pass' => '******',
        'mailtype'  => 'html',
        'charset'   => 'iso-8859-1'
    );
?> 

```

**Some Controller:**

```
public function sendMessage(){
    $this->load->library('email');
    $this->email->set_newline("\r\n");
    $this->email->from('me@here.comk', 'My Name');
    $this->email->to("someone@somewhere.com");
    $this->email->subject('A test email from CodeIgniter using Gmail');
    $this->email->message("A test email from CodeIgniter using Gmail");
    $this->email->send();
}

```

With this setup, everything works fine, but now if **I wanted to change some settings how would I do that?** For example, I want to send the email from a different account in and part of the website: I need to be able to change the `smtp_user` and the `smtp_pass` fields. How would I do this? I want to avoid rewriting a whole new config array.