Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Problem with Mail() - PHP 5 vs PHP 4
February 27, 2006, 4:04 pm
rate this thread
write to a database and also send out an email. For some reason, when
I take this code to work, it still writes to the database but doesn't
send mail so we're (me and the I.T. guy) trying to find out whether
it's the difference between PHP 4 or something else with email
Does anyone here have experience with mail() in PHP 4 to know whether
PHP 4 had issues with mail() that were fixed with PHP 5 ???? We've
been chasing this from the mail server side at work when perhaps its
some nuance between versions of PHP.
Appreciate any help...
/* > $to = stripslashes($to); */
$to = stripslashes($to)."\r\n";
$subject = stripslashes($subject);
$text = stripslashes($text);
/* > mail('$to',$subject, $text); */
mail($to, $subject, $text, "From: firstname.lastname@example.org");
- Janwillem Borleffs
February 27, 2006, 9:33 pm
Re: Problem with Mail() - PHP 5 vs PHP 4
perhaps it's your from address is invalid on your mailserver.
or it could be php.ini
; For Win32 only.
;sendmail_from = email@example.com
; For Unix only. You may supply arguments as well (default:
"sendmail -t -i").
; Force the addition of the specified parameters to be passed as extra
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail(), even in safe mode.
is set wrong.