I have some problem and I don't understand.
This is my code
$this->load->library('email');
$config['protocol'] = 'sendmail';
$config['mailpath'] = '/usr/sbin/sendmail';
$config['charset'] = 'iso-8859-1';
$config['wordwrap'] = TRUE;
$this->email->initialize($config);
$this->email->from('rudzstyle@yahoo.co.id', 'Your Name');
$this->email->to('rudzstyle@gmail.com');
$message = $data->nama_depan.'<br>'.$this->input->post('snk');
$this->email->subject($message);
$this->email->message('Testing the email class.');
$this->email->send();
echo $this->email->print_debugger();
that 2 email are active email.
and the result of the debugger is this
Exit status code: 1 Unable to open a socket to Sendmail. Please check
settings. Unable to send email using PHP Sendmail. Your server might
not be configured to send mail using this method.User-Agent: CodeIgniter Date: Mon, 2 Jun 2014 07:53:21 +0200 From:
"Your Name" Return-Path: To: rudzstyle@gmail.com Subject:
=?iso-8859-1?Q?Riyanto test?=
=?iso-8859-1?Q??= Reply-To: "rudzstyle@yahoo.co.id" X-Sender: rudzstyle@yahoo.co.id X-Mailer: CodeIgniter X-Priority: 3
(Normal) Message-ID: <538c1151179cb@yahoo.co.id> Mime-Version: 1.0Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bitTesting the email class.
Best Answer
In Codeigniter, Try this
In
$config['smtp_user']
field,give your email_id and in$config['smtp_pass']
field,provide your password for that mail.This will work.Just try it. Hope this will solve your problem.