CodeIgniter PHP Mail Function Not Working

SpiderX

New Member
I have a script which sends an email to myself from a contact page:\[code\]if($_POST["submit"] == "Send Message"){ $to = "[email protected]"; $subject = "Message received from Contact Us"; $message = "Email: ".$_POST["email"]."<br>"; $message .= "Name: ".$_POST["name"]."<br>"; $message .= "Message: ".$_POST["message"]."<br>"; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; echo mail($to,$subject,$message,$headers); $messageSent = TRUE;}\[/code\]It does actually echo 1. But I am not receiving any emails in my email account (gmail). I am using Codeigniter I saw there's an email library, but this should work shouldn't it?I have a couple of other similar forms, I don't really want to integrate this library if I already have normal PHP to do it.I know that my server is capable of sending emails because I've done it before, i have a feeling this is codeigniter related. If there is no other options, I suppose I can use the library and change the code. Any advice on this will help! Thank you :)
 
Back
Top