ねえ誰かが私がこの問題から抜け出すのを手伝ってくれる、私は次のエラーを受け取っていますPHPエラーが発生しました
Severity: Warning
Message: fsockopen() [function.fsockopen]: unable to connect to ssl://smtp.googlemail.com:587 (Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?)
Filename: libraries/Email.php
Line Number: 1689
A PHP Error was encountered
Severity: Warning
Message: fwrite() expects parameter 1 to be resource, boolean given
Filename: libraries/Email.php
Line Number: 1846
そして、私は私のメール送信者クラスに次のコードを持っています
Class MailSender extends CI_Model{
function __construct(){
parent::__construct();
}
public function sendMail(){
$config=array(
'protocol'=>'smtp',
'smtp_host'=> 'ssl://smtp.googlemail.com',
'smtp_port' => 587,
'smtp_user' => 'bhatta.bj@gmail.com',
'smtp_pass' => 'signature08'
);
$this->load->library('email',$config);
$this->email->set_newline("\r\n");
$this->email->from("bhatta.bj@gmail.com");
$this->email->to("curtains_v@hotmail.com");
$this->email->subject("this is a sample mail");
$this->email->message("this is a sample message please check this");
if($this->email->send()){
//$data['message']="Email sent successfully";
return true;
}else{
//$data['message']="Couldnt sent the email, please provide me valid email address";
return false;
}
}
}