Welcome Guest, Not a member yet? Register   Sign In
sending a basic mail with php mail()
#1

[eluser]virtualgadjo[/eluser]
Hi all,

not exactly new to CI but this time i feel like a newb Smile

i'm desesperatly trying to send a simple mail from a website using CI email library (with protocol => mail) and i get the following error
Quote:Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.
when sending the same mail the "old" way with the basic
Code:
$headers  = "From: ".utf8_decode($from)."\n";
$headers .= 'Reply-To: '.$data['email']."\n";
$headers .= 'X-Mailer: PHP/' . phpversion();
$success  = @mail($to, stripslashes(utf8_decode($sujet)), stripslashes(utf8_decode($body)), $headers)
it works like a breeze !!! (then i can assume my server is configured to send mail with mail() can't i ? Smile)

any idea would be warmly welcome Smile
chris

PS sorry, forgot to say CI 2.0.1...


Messages In This Thread
sending a basic mail with php mail() - by El Forum - 03-24-2011, 07:39 AM
sending a basic mail with php mail() - by El Forum - 03-24-2011, 08:11 AM
sending a basic mail with php mail() - by El Forum - 04-24-2011, 05:38 PM
sending a basic mail with php mail() - by El Forum - 04-25-2011, 12:03 AM
sending a basic mail with php mail() - by El Forum - 04-25-2011, 02:31 AM
sending a basic mail with php mail() - by El Forum - 04-25-2011, 03:34 AM
sending a basic mail with php mail() - by El Forum - 04-25-2011, 04:03 AM



Theme © iAndrew 2016 - Forum software by © MyBB