$ this-> email-> send();发送功能出错

时间:2019-04-25 10:23:22

标签: php codeigniter

电子邮件正在发送,但仍显示错误消息,只是想删除错误消息代码,其工作正常

    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

0 个答案:

没有答案
相关问题