我目前在我的網站上有一個聯繫表,它在提交後發送電子郵件通知。它完美地工作在我的最後,甚至當我把它從外部發送給朋友作爲他們正在接受的測試。CodeIgniter電子郵件未收到
但是,我在法國的客戶似乎無法收到此電子郵件,我不知道爲什麼。有什麼我需要做,以確保他們收到它?我認爲這是他們的最終目標,但他們絕對堅持認爲它不是,這是我的代碼問題。我嘗試了不同域名的不同電子郵件地址,但仍然沒有運氣!
$this->load->library('parser');
$config['mailtype'] = 'html';
$config['charset'] = 'utf-8';
$this->load->library('email');
$data = array(
'first_name' => $this->input->post('first_name'),
'last_name' => $this->input->post('last_name'),
'email' => $this->input->post('email'),
'phone' => $this->input->post('phone'),
'message' => $this->input->post('message')
);
$body = $this->parser->parse('html_email', $data, true);
$this->email->from('[email protected]', 'Duparc');
$this->email->to('[email protected]');
$this->email->subject('Test Email');
$this->email->message($body);
$this->email->send();
也許電子郵件正在發送,但在垃圾郵件文件夾中。 –