Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8014903
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T20:05:16+00:00 2026-06-04T20:05:16+00:00

I want to send mail using codeigniter. I am using codeigniter as mailer. i

  • 0

I want to send mail using codeigniter. I am using codeigniter as mailer. i have written a controller and upload it on net . when i call the controller. This shows errors.I am writing my controller like

<?php

class Testmail extends CI_Controller {

    public $data = array();

    public function __construct()
    {
        parent::__construct();
        $this->load->helper('url_helper');
        $this->load->helper(array('form', 'url'));
        $this->load->library('email');
        $this->load->helper('url'); 

    }

    public function mailsend()
    {
            $config['protocol'] = 'sendmail';
            $config['mailpath'] = '/usr/sbin/sendmail';
            $config['charset'] = 'iso-8859-1';
            $config['wordwrap'] = TRUE; 
            $this->email->initialize($config);

            $this->email->from('kunal.saxena.kunal@gmail.com', 'Your Name');
            $this->email->to('kunal.saxena.kunal@gmail.com'); 
            $this->email->subject('Email Test');
            $this->email->message('Testing the email class.');  

            $this->email->send();

            echo $this->email->print_debugger();


    }
}

But it is not working and i got the error like

Exit status code: 127
Unable to open a socket to Sendmail. Please check settings.
Unable to send email using PHP Sendmail. Your server might not be configured to send mail using this method.
User-Agent: CodeIgniter
Date: Mon, 28 May 2012 10:51:18 +0000
From: "Your Name" 
Return-Path: 
To: kunal.saxena.kunal@gmail.com
Subject: =?iso-8859-1?Q?Email_Test?=
Reply-To: "kunal.saxena.kunal@gmail.com" 
X-Sender: kunal.saxena.kunal@gmail.com
X-Mailer: CodeIgniter
X-Priority: 3 (Normal)
Message-ID: <4fc358a653ad4@gmail.com>
Mime-Version: 1.0


Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

Testing the email class.

How to remove this error..?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T20:05:18+00:00Added an answer on June 4, 2026 at 8:05 pm

    Make sure your server has sendmail and it is correctly set up, In case you don’t have it and can’t install it you can use googles SMTP server to send emails, this is what I do on localhost. You can find and example of how to do it here

    PS. Controller looks fine

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using asp.net and C#. I want to send mail to my user
I am using asp.net 3.5 and C#. I want to send mail from asp.net,
I am trying to send mail using mail templates. To do this I want
I want to send email using Zend Mail library. How I have to include
I want to send mail using sendmail to multiple recipients in single call. I
How to send Mail using PostMark SMTP server using Sytem.Net.Mail ? I don't want
I am using java to send mail. I want to set the from mail
I wanted to know how to send e-mail using javascript. I dont want to
I want to send HTML-emails, using Django templates like this: <html> <body> hello <strong>{{username}}</strong>
I am using mail function as i want to send message in a format

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.