How to send email with an attachment using Codeigniter

In this tutorial, we’ll show the most used email features for the web project. Using our sample code you can send a text email, HTML email, and email with an attachment in Codeigniter.



$config['protocol'] = 'sendmail';
$config['mailpath'] = '/usr/sbin/sendmail';
$config['charset'] = 'iso-8859-1';
$config['wordwrap'] = TRUE;
$config['mailtype'] = 'html';

$this->email->message("Type Your Message");

Leave a Reply

Your email address will not be published. Required fields are marked *