Wie kann ich E-Mails von localhost mit Codeigniter senden?

    function sendMail() {

  $config = Array(
  'protocol' => 'smtp',
  'smtp_host' => 'ssl://smtp.googlemail.com',
  'smtp_port' => 465,
  'smtp_user' => '[email protected]', 
  'smtp_pass' => 'xxx', 
  'mailtype' => 'html',
  'charset' => 'iso-8859-1',
  'wordwrap' => TRUE
);

        $message = 'test';
        $this->load->library('email', $config);
      $this->email->set_newline("\r\n");
      $this->email->from('[email protected]');
      $this->email->to('[email protected]');
      $this->email->subject('testing');
      $this->email->message($message);
      if($this->email->send())
     {
      echo 'Email sent.';    
     }
     else
    {
     show_error($this->email->print_debugger());  
    }

}

Dies ist mein Code. Ich versuche, eine E-Mail von localhost mit Codeigniter zu senden. Ich habe die Nachricht "E-Mail gesendet" erhalten. aber ich habe keine E-Mail in Google Mail-Konto.

Antworten auf die Frage(8)

Ihre Antwort auf die Frage