Friday, February 14, 2014

Sending Email in Codeigniter

Sending Email in Codeigniter


Create a controller email.php in '/application/controllers/' location
And paste following php code and change mail address.

$this->load->library('email');

$this->email->from('your@example.com', 'Your Name');
$this->email->to('someone@example.com');
$this->email->cc('another@another-example.com');
$this->email->bcc('them@their-example.com');

$this->email->subject('Email Test');
$this->email->message('Testing the email class.');

$this->email->send();

echo $this->email->print_debugger();


I hope that it will help you.

Thanks.

No comments:

Post a Comment