My code to send mail from PHP:
public function send_credentials($beneficiary_user){
$this->load->library(‘email’);
$email_config = Array(
'protocol' => 'smtp',
'smtp_host' => 'ssl://smtp.googlemail.com',
'smtp_port' => '465',
'smtp_user' => 'app123testing@gmail.com',
'smtp_pass' => 'apptesting',
'mailtype' => 'html',
'starttls' => true,
'newline' => "\r\n"
);
$this->email->from('app123testing@gmail.com', 'invoice');
$this->email->to('anilapu@navaratan.com');
$this->email->subject('Invoice');
$this->email->message('Test');
$this->email->send();
}
What are the other settings I have to do to make it work *After running echo $this->email->print_debugger();. I got:
Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.
User-Agent: CodeIgniter
Date: Sun, 9 Feb 2014 14:58:44 +0530
From: "invoice"
Return-Path:
Reply-To: "app123testing@gmail.com"
X-Sender: app123testing@gmail.com
X-Mailer: CodeIgniter
X-Priority: 3 (Normal)
Message-ID: <52f74a4c41e32@gmail.com>
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="B_ALT_52f74a4c41e88"
=?utf-8?Q?Invoice?=
This is a multi-part message in MIME format.
Your email application may not support this format.
--B_ALT_52f74a4c41e88
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Test
--B_ALT_52f74a4c41e88
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Test
--B_ALT_52f74a4c41e88--