I am not familiar with sending mail using smtp , i tried with this code but i didnt get any email . I want to know should i set any configuration in my webmail.
$email_config = Array(
'protocol' => 'smtp',
'smtp_host' => 'ssl://smtp.gmail.com',
'smtp_port' => '465',
'smtp_user' => 'noreply@mydomain.com',
'smtp_pass' => '1234563767',
'mailtype' => 'html',
'starttls' => true,
'newline' => "\r\n"
);
$this->load->library('email', $email_config);
$this->email->from('noreply@mydomain.com', 'enquiry');
$this->email->to("test@mydomain.com");
$this->email->subject('Package Enquiry');
$email = $this->load->view('packages/enquiry',true);
$this->email->message($email);
$this->email->send();