CodeIgniter Forums
sending email not working - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: sending email not working (/showthread.php?tid=35898)



sending email not working - El Forum - 11-15-2010

[eluser]sudinem[/eluser]
I've use these codes to send email. But, when I run the code, it returns me the message "Something went wrong..."
But, when I change $config['protocol']='mail'. ...Then I get the message "your message has been sent". But, when I check my inbox, I didn't get any mails.

I've googled my problem but couldn't get any solution. Do you guyz have any solution???


Code:
function testMailer()
{
$config['protocol']='sendmail';
$this->load->library('email');
$this->email->initialize($config);

$name = "test";
$email = "[email protected]";
$message= "Testing";

$this->email->from("[email protected]", "name");
$this->email->to('[email protected]');

$this->email->subject('Subject');
$this->email->message($message);
if($this->email->send())
{
echo $this->email->print_debugger();
}
else
{
echo 'Something went wrong...';
}


}



sending email not working - El Forum - 11-16-2010

[eluser]Deveron[/eluser]
Hi,
check your JUNK Box as well.


sending email not working - El Forum - 11-16-2010

[eluser]InsiteFX[/eluser]
If you are running Windows, I use this tool for sending and checking emails.

Test Server Mail Tool

InsiteFX