Wednesday, July 24, 2024

How to send mail in codeigniter on localhost server?

send mail in codeigniter on localhost server

Hello, welcome to In this post, I will tell you How to send mail in codeigniter on localhost server? Today I was working with codeigniter and there is email feature but that need to work on localhost but I stuck at that point. After some time i got the solution and today I will share that code with you. First I tell you codeigniter is great MVC framework and I like it very much. Here you can check the code for send email from localhost server. First you need you make an account on and after making an account you will get username and password for smtp settings and you need to add that settings in your site. After done with all you will get emails on your account and this is very cool. Here is working code and you need to add this your codeigniter’s config.php file:

$config['email'] = Array( 
                        'protocol'  => 'smtp', 
                        'smtp_host' => '', 
                        'smtp_port' =>  2525, 
                        'smtp_user' => 'eeeeeeeeeeeeee', 
                        'smtp_pass' => 'eeeeeeeeeeeeee', 
                        'crlf'      => "\r\n", 
                        'newline'   => "\r\n"


There are so many code in codeigniter and i will let you know all. Please do comment if you any query related to this post. Thank you.

the authortherichpost
Hello to all. Welcome to Myself Ajay Malhotra and I am freelance full stack developer. I love coding. I know WordPress, Core php, Angularjs, Angular 14, Angular 15, Angular 16, Angular 17, Bootstrap 5, Nodejs, Laravel, Codeigniter, Shopify, Squarespace, jQuery, Google Map Api, Vuejs, Reactjs, Big commerce etc.

Leave a Reply

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