Welcome Guest, Not a member yet? Register   Sign In
email class problem
#1

[eluser]Antonius Willson[/eluser]
i get some trouble..
this is an error


Exit status code: 1
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: Tue, 8 Mar 2011 05:07:21 +0100
From: "awkawkawk"
Return-Path:
To: [email protected]
Subject: =?iso-8859-1?Q?[EMAIL]_New_request?=
Reply-To: "[email protected]"
X-Sender: [email protected]
X-Mailer: CodeIgniter
X-Priority: 3 (Normal)
Message-ID: <[email protected]>
Mime-Version: 1.0


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

blabla


this is my email.php code :

Code:
&lt;?php
class Email extends CI_Controller {
    
    function __construct() {
        parent::__construct();
        $this->load->library('email');
        
        $config['charset'] = 'iso-8859-1';
        $config['wordwrap'] = FALSE;
        $this->email->initialize($config);
    }
    
    function index()
    {

    $this->email->from('[email protected]', 'willson');
    $this->email->to('[email protected]');
    
    $this->email->subject('[EMAIL] New request');
    $this->email->message('blabla');
    $this->email->send();
    echo $this->email->print_debugger();
    


    }
}
?&gt;

this is my config email.php code :
Code:
&lt;?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

$config['protocol'] = 'sendmail';
$config['mailpath'] = '/usr/sbin/sendmail';
$config['charset'] = 'iso-8859-1';
$config['wordwrap'] = TRUE;
$config['mailtype'] = 'text';
?&gt;
#2

[eluser]InsiteFX[/eluser]
Well if you read the CodeIgniter User Guide you would know that you need to set a port address etc.

You need to read the CodeIgniter User Guide!

InsiteFX




Theme © iAndrew 2016 - Forum software by © MyBB