Categories

Monday, December 23, 2024
#919814419350 therichposts@gmail.com
CodeigniterPhp

How to send mail in codeigniter on localhost server?

send mail in codeigniter on localhost server

Hello, welcome to therichpost.com. 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 mailtrap.io 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 mailtrap.io 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.mailtrap.io', 
                        '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. Therichpost.com

therichpost
the authortherichpost
Hello to all. Welcome to therichpost.com. Myself Ajay Malhotra and I am freelance full stack developer. I love coding. I know WordPress, Core php, Angularjs, Angular 19, MedusaJs, Next.js, 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.