当我完成注册程序时,我的代码说注册成功并且检查登录链接和密码的电子邮件。但是当我检查我的电子邮件时,我看不到任何电子邮件。这是我的代码。
function send_email($name,$email,$password_generate,$login_link){
$from_email="myemail@gmail.com";
$data = array(
'name'=> $name,
'email'=> $email,
'password'=> $password_generate,
'login_url' => $login_link
);
$body = $this->load->view('backend/email',$data,TRUE);
$config = array(
'protocol' => 'smtp',
'smtp_host' => 'mail.mysite.com',
'smtp_user' => $from_email,
'smtp_pass' => 'mysite@Dhaka',
'smtp_port' => 25,
'mailtype' => 'html',
'charset' => 'UTF-8',
'newline' => "\r\n",
'wordwrap' => TRUE
);
$this->load->library('email');
$this->email->initialize($config);
$this->email->from($from_email, 'mysite');
$this->email->to($email);
$this->email->subject('Login Authentication');
$this->email->message($body);
if(!$this->email->send()){
}
}
问题是什么? ..我需要一个解决方案......