Send Email Using PHPMailer and Codeigniter

Send Email Using PHPMailer and Codeigniter

CodeIgniter Email Class built for handling double-byte characters is really bad, cannot be properly set up Charest UTF-8.

Here We want to share some information to use Codeigniter and PHPmailer together. In this way, you can send any type of codes in Email Body.

We have to follow few steps to use PHPmailer with CodeIgniter.

1- Download PHPmailer from original site.
2- Extract the downloaded “Zip” file.
3- Open the extracted file and copy “phpmailer.php” and “class.smtp.php”.
4- Paste these Two Files in Codeigniter Libraries.
5- Now create now controller as I have following one.


You simply need to pass values to this function and email is sent. To Read Simple PHPMailer to send email using PHP. Your controller is ready to send email using PHPMailer. This was simple, If you want to modify this controller, e.g you want to send html pages, you will kindly let me know, we will write another tutorial regarding this.