if ($this->form_validation->run()) {
$key = sha1(uniqid());
$this->load->library('email', array('mailtype' => 'html'));
$this->load->model('customerModel');
$this->email->from('codeigniter.emailverify', 'emailverify');
$this->email->to($this->input->post('email'));
$this->email->subject('Confirm Your Account');
$message = "Welcome Ayos Member";
$message .="<p><a href='" . base_url() . "main/register_cust/$key'>CLICK HERE </a>TO COMFIRM YOUR ACCOUNT</p>";
$this->email->message($message);
if ($this->customerModel->account($key)) {
if ($this->email->send()) {
echo "<script>
alert('Successfully Sent');
window.location.href='register';
</script>";
} else {
/* echo "<script>
alert('Failed to Sent');
window.location.href='register';
</script>";*/
echo $this->email->print_debugger();
}
} else {
echo "problem in database";
}
} else {
$this->load->view('pages/include/header');
$this->load->view('pages/register');
$this->load->view('pages/include/footer');
}
}
i have this code in email verification. it perfectly works in my pc it sent to the email and when i transfer my whole project in my laptop it doesnt sent to the email