I am trying to setup SMTP on CodeIgniter. Everything is working fine and I recieve success message on page, that email is sent without errors. But, email is not delivered.
Here is the code, that I use:
$config = Array(
'protocol' => 'smtp',
'smtp_host' => 'ssl://smtp.googlemail.com',
'smtp_port' => 465,
'smtp_user' => '[email protected]',
'smtp_pass' => '***',
'mailtype' => 'html',
'charset' => 'iso-8859-1',
'wordwrap' => TRUE
);
$this->load->library('email', $config);
$this->email->from('[email protected]', 'Explendid Videos');
$this->email->to('[email protected]');
$this->email->reply_to('[email protected]', 'Explendid Videos');
$this->email->subject('Explendid Video - Contact form');
$message = "Contact form
";
$message .= "Name: ". $_POST['name'] . "
";
$message .= "Phone: ". $_POST['phone'] . "
";
$message .= "Email: ". $_POST['email'] . "
";
$this->email->message($message);
$this->email->send();
What can be the reason, that e-mail is not actually delivered.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…