php - $this->email->send(); 错误在于发送功能
问题描述
电子邮件正在发送但仍显示错误消息只是想删除错误消息代码正常工作
public function search()
{
$post=$this->input->post();
$To['To'] = $post['to'];
if(!empty($post)){
$post['check_in']=date('d-m-Y',strtotime($post['check_in']));
$post['check_out']=date('d-m-Y',strtotime($post['check_out']));
$this->load->library('email');
$config['protocol'] = "sendmail";
$config['smtp_crypto'] = "ssl";
$config['smtp_host'] = "mail.flightsworld.co.uk";
$config['smtp_port'] = "587";
$config['smtp_user'] = "info@flightsworld.co.uk";
$config['smtp_pass'] = "";
$config['charset'] = "utf-8";
$config['mailtype'] = "html";
$config['newline'] = "\r\n";
$this->email->initialize($config);
$message="<h1>Flights Enquiry (Flights World)</h1></br>";
$message.="Phone: ".$post['phone']."<br>";
$message.="Email: ".$post['email']."<br>";
$message.="From: ".$post['from']."<br>";
$message.="To: ".$post['to']."<br>";
$message.="Check In: ".$post['check_in']."<br>";
$message.="Check Out: ".$post['check_out']."<br>";
$message.="No of Passengers: ".$post['no_of_pass']."<br>";
$message.="<br><br>Thank You";
$this->email->from("info@flightsworld.co.uk"); // change it to yours
$this->email->to('flightsworld@outlook.com');// change it to yours
// $this->email->to('salmansidd17@gmail.com');// change it to yours
$this->email->subject("Flights world Enquiry");
$this->email->message($message);
$this->email->send();
$this->load->view('site/search', $To);
}
}
电子邮件正在发送,但发送功能仍然显示错误
File: /home/p9j6x14w0twe/public_html/application/controllers/Site.php
Line: 70
Function: send this the error
解决方案
推荐阅读
- node.js - 节点; 可读流抛出错误时的默认值
- java - 从 Android Activity 启动 LibGDX 屏幕
- python - 使用 numpy 将矩阵映射到特定向量
- outlook-addin - Outlook 365 对话框打开时间过长会导致 Outlook 插件崩溃
- python - 向 DataFrame 添加新列,其值取决于索引 ref
- javascript - 如何将数据库内容显示到 EJS 网页?
- laravel - Laravel - 两个工厂互相引用
- excel - 无法按日期对数据透视表进行排序
- arrays - RX.JS 相当于 fromArray?
- javascript - 我们可以在不使用 jQuery ui 的情况下创建一个三句柄 HTML 范围滑块吗