How to fix SMTP email error in Codeigniter email function ?

programmers who are developing the web applications using Codeigniter would have got an error when trying to use Codeigniter’s email function. The core email library file which has all the inbuilt functions to initiate emails from the website. By default, the SMTP protocol is set in the port of 25 but all the web servers will not support this.

so if you want to just get rid of the SMTP mail protocol and like to just using the normal PHP email function, just follow the below steps.

1. Go to /system/libraries/ and open the file “Email.php”
2. Find the variable “$_protocols”
3. Replace the array value with “array(‘mail’, ‘sendmail’, ”)”

That’s it. Now the codeigniter will use the normal PHP mail function to send the emails.

Leave a Reply

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


* Copy This Password *

* Type Or Paste Password Here *

22,093 Spam Comments Blocked so far by Spam Free Wordpress

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.