我已經配置以下設置郵件發送但未被接收,笨
$config = Array(
'protocol' => 'smtp',
'smtp_host' => 'ssl://smtp.gmail.com',
'smtp_port' => 465,
'smtp_user' => '[email protected]', // change it to yours
'smtp_pass' => 'xyz', // change it to yours
'smtp_timeout'=>20,
'mailtype' => 'text',
'charset' => 'iso-8859-1',
'wordwrap' => TRUE
);
$this->load->library('email',$config);
//$this->email->set_newline("\r\n");
$this->email->from('[email protected]', 'Garima');
$this->email->to('[email protected]');
// mail message here
我得到以下信息:
Your message has been successfully sent using the following protocol: mail
From: "Garima" [email protected]
Return-Path: [email protected]
Reply-To: "[email protected]"
X-Sender: [email protected]
X-Mailer: CodeIgniter
X-Priority: 3 (Normal)
Message-ID: <@gmail.com>
Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit
首先,如果我有定義的協議如SMTP,爲什麼它將協議顯示爲郵件。
其次,顯示的信息中沒有「to」字段。爲什麼這樣?我必須做什麼改變?
您使用哪種類型的本地主機進行測試? xammp wamp等 – user4419336
我正在使用xampp – GMehta
另一件事是做一些時間codeigniter不會發送,除非發送電子郵件設置配置在xampp設置https://www.youtube.com/watch?v=TO7MfDcM-Ho – user4419336