CodeIgniter Forums
email problem with localhost XAMPP - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: email problem with localhost XAMPP (/showthread.php?tid=41022)



email problem with localhost XAMPP - El Forum - 04-26-2011

[eluser]Unknown[/eluser]
Code:
$config = array(
    'protocol' => 'smtp',
    'smtp_host' => 'ssl://smtp.gmail.com/',
    'smtp_port' => 465,
    'smtp_user' => '[email protected]',
    'smtp_pass' => 'nothing'
);

$this->load->library('email',$config);
$this->email->set_newline("\r\n");

$this->email->from('[email protected]','Hello..');
$this->email->to('[email protected]');
$this->email->subject('About...');
$this->email->message('Hello...!');

if($this->email->sent()){
    echo 'Sent!';
}
else{
    show_error($this->email->send_debugger());
    echo 'Sending message failed';  
}

help me...
when i access it will show the error referring to the line if($this->email->sent()){ :
Fatal error: Call to undefined method CI_Email:Confusedent()


email problem with localhost XAMPP - El Forum - 04-26-2011

[eluser]toopay[/eluser]
Code:
//$this->email->sent() <== There is no 'sent' method within CI email library
$this->email->send()



email problem with localhost XAMPP - El Forum - 04-26-2011

[eluser]Unknown[/eluser]
Whenever you works in local server (XAMPP or WAMP) for developing any email functionality in website, than you might be wonder that why email is not going from localhost(XAMPP or WAMP) in windows environment. Well, i faced the same situation and in this case i can help you. Below is the error you might get when working with email.
"Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in"
mouse control


email problem with localhost XAMPP - El Forum - 04-28-2011

[eluser]Unknown[/eluser]
@ballerfollev: how did you solve your localhost email problem!


email problem with localhost XAMPP - El Forum - 04-28-2011

[eluser]InsiteFX[/eluser]
He's a SPAMMER!


email problem with localhost XAMPP - El Forum - 04-28-2011

[eluser]michalsn[/eluser]
@gchimuel for testing email functionality on localhost I always use this: http://www.toolheap.com/test-mail-server-tool/