Below are my code and I refer all examples in stack overflow and codeigniter user guide. still I unable to solve this
public function send() { $config[\
Quỳnh Nguyễn's answer worked for me too. However I think it's worth pointing out that my code fails unless I put the line
$this->email->set_newline("\r\n");
Without that line, gmail complaints about wrong user/password :|
Regards