Sending Email


Sending email in CodeIgniter is much easier. You also configure the preferences regarding email in CodeIgniter. CodeIgniter provides following features for sending emails :
− Multiple Protocols − Mail, Sendmail, and SMTP
– TLS and SSL Encryption for SMTP
– Multiple recipients
– CC and BCCs
– HTML or Plaintext email
– Attachments
– Word wrapping
– Priorities
– BCC Batch Mode, enabling large email lists to be broken into small BCC batches.
– Email Debugging tools

Sending Email


Create a controller file Email.php and save it in application/controller/learning/Email.php.

Create a view file called email_form.php and save it at application/views/learning/email_form.php

Use the following URL in the browser to execute the above example.

Notes :
1. extension=php_openssl.dll must be active.
2. When you add library email in autoload.php, you must set config like this

3. If you use gmail, you must set less secure on,

Reference :


Please enter your name here
Please enter your comment!