email class problem |
[eluser]thephpx[/eluser]
my index() in controller welcome.php : $this->load->library(‘email’); $config[‘protocol’] = ‘sendmail’; $this->email->initialize($config); $this->email->from(‘[email protected]’, ‘thephpx’); $this->email->to(‘[email protected]’); $this->email->subject(‘Email Test’); $this->email->message(‘Testing the email class.’); $this->email->send(); echo $this->email->print_debugger(); response text: 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: Mon, 16 Feb 2009 08:10:32 +0000 From: “thephpx” Return-Path: To: [email protected] Subject: =?utf-8?Q?Email_Test?= 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=utf-8 Content-Transfer-Encoding: 8bit Testing the email class. Please suggest what is the problem
[eluser]sophistry[/eluser]
[quote author="thephpx" date="1234823863"]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.[/quote] um... i think it is because your server might not be configured to send mail using this method. ;-) try mail or smtp methods as suggested in the documentation.
[eluser]M Moeen uddin[/eluser]
Do you find the solution of this problem? I m having the same issue. Well, it was working a few days back, with no error. PHP inof shows that send mail path is correct and all other things also fine. what am i missing here?
[eluser]Zorancho[/eluser]
Try this: Code: $this->load->library('email');
[eluser]tj[/eluser]
tnx for reply.i dont know whats my problem was now its works fine in sendmail and smtp maybe because of my server
[eluser]Zorancho[/eluser]
it could be the server, my function is in MY_Controller.php class: Code: function send_email($from, $to, $from_name, $subject, $message, $attachment = NULL) |
Welcome Guest, Not a member yet? Register Sign In |