//send email function
public function sendemail(){
$from1 = $this->input->post('from');//input name
$to1 = $this->input->post('to');//input name
$subject1 = $this->input->post('subject');//input name
$message1 = $this->input->post('message');//input name
$config = Array(
'protocol' => 'smtp',
'smtp_host' => 'ssl://smtp.googlemail.com',
'smtp_port' => 465,
'smtp_user' => 'malinga@bckonnect.com',
'smtp_pass' => 'mal@pass',
'mailtype' => 'html'
);
$this->load->library('email', $config);//load library Codeigniter
$this->email->set_newline("\r\n");
// Set to, from, message, etc.
$this->email->to($to1);
$this->email->from($from1,$from1);
//$this->email->bcc("example2@domain.com");
$this->email->subject($subject1);
$this->email->message($message1);
$result = $this->email->send();
$this->session->set_flashdata('msg','<div class="alert alert-success">Message Sent Successfully!</div>');
redirect('welcome/index');
}
this is my email function code.it is working for gmail.but it is not working for Zoho mail.Why?