$this->load->library('email'); $config['useragent'] = 'My cool mailer'; $this->email->initialize($config); ... $this->email->send();