我已经配置以下设置邮件发送但未被接收,笨
$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