CODEIGNITER email : Iam trying to send email using codeigniter is there anyway I can send message in any email for example gmail, yahoo, or outlook .com so, this is what i have:

	public function sendmail()
	{
    $config['protocol'] = 'sendmail';
    $config['mailpath'] = '/usr/sbin/sendmail';
    $config['charset'] = 'iso-8859-1';
    $config['wordwrap'] = TRUE;

    
		$this->load->library('email',$config); // load email library
    $this->email->set_newline ("\r\n");

    $this->email->from('user@gmail.com', 'sender name');
    $this->email->to('test@gmail.com');
    $this->email->subject('Your Subject');
    $this->email->message('ed wow sir');
    if ($this->email->send())
        echo "nasend na!";
    else
        echo $this->email->print_debugger();
	}

and it shows error :

Exit status code: 1
Unable to open a socket to Sendmail. Please check settings.
Unable to send email using PHP Sendmail. Your server might not be configured to send mail using this method.