[Solved] send email by using codeigniter library via server


thanks… i done it with same code…

just change the port then its working….

here is code

function do_email($msg=NULL, $sub=NULL, $to=NULL, $from=NULL){
$this->load->library(’email’);

    $config = array();
    $config['protocol']='smtp';
    $config['smtp_host']='localhost';
    $config['smtp_port']='587';
    $config['charset']='utf-8';
    $config['newline']="\r\n";
    $config['wordwrap'] = TRUE;
    $config['mailtype'] = 'html';

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


    $this->email->from($from, $system_name);
    $this->email->to($to);
    $this->email->subject($sub);
    $this->email->message($msg);
    $email = $this->email->send();

}

solved send email by using codeigniter library via server