Ich bin neu in codeigniter Ich versuche, E-Mail mit Codeigniter E-Mail-Klasse senden, aber ich bin immer Fehler fsockopen(): nicht in der Lage zu smtp.googlemail.com:465 verbinden (Connection timed out) i, dieses Problem zu lösen versucht, aber kein GlückFehler erhalten fsockopen(): Verbindung mit smtp.googlemail.com:465 (Verbindung fehlgeschlagen) beim Senden von E-Mails mit Codeigniter E-Mail Klasse
public function signup()
{
$this->form_validation->set_rules('email','Email','required|valid_email|is_unique[fbadmin.email]');
$this->form_validation->set_error_delimiters("<p class='text-danger'>","</p>");
if($this->form_validation->run()==TRUE)
{
$data= $this->input->post();
unset($data['submit']);
//print_r($data);exit;
$this->load->model('Fbadminmodel');
if($this->Fbadminmodel->signup($data))
{
//$this->load->library('email');
$config = array(
'protocol' =>'smtp',
'smtp_host' =>'smtp.googlemail.com',
'smtp_port' =>'465',
'smtp_user' =>'[email protected]',
'smtp_pass' =>'password',
'mail_type' =>'html',
'charset' =>'utf-8'
);
//$this->email->initialize($config);
$this->load->library('email', $config);
$this->email->from('[email protected]','Anuj Kumar');
$this->email->to($data);
$this->email->message('www.haiviral.com');
$this->email->set_newline("\r\n");
if($this->email->send())
{
//$this->session->set_flashdata('feedback','Succefully Registred. Please verify your email');
echo "mail send";
}
else
{
show_error($this->email->print_debugger());
}
}
else
{
$this->load->view('fbadmin');
$this->session->set_flashdata('feedback','Registration Failed');
}
//$this->session->flashdata('flash','Email Sent');
$this->load->view('fbadmin');
}
else
{
echo validation_errors();
$this->load->view('fbadmin');
}
}
stellen Sie sicher, extension = php_openssl.dll in Sie php.ini und ' 'smtp_host' =>‚ssl aktiviert hinzufügen: // smtp.googlemail.com'', Ihren Beitrag über, Int-Wert – webDev
php_openssl.dll ist bereits geöffnet –
make ''smtp_host' => 'ssl: // smtp.googlemail.com'', übergeben Sie Ihren Beitrag als int Wert – webDev