ID: 15221 Comment by: ianring at golden dot net Reported By: dansixus at yahoo dot com Status: No Feedback Bug Type: Mail related Operating System: Windows XP Pro. PHP Version: 4.1.1 New Comment:
Running the code below, $success is false. I do not know why the mail() function is not working. No other error messages appear on the screen. <?php $to = "[EMAIL PROTECTED]"; $subject = "this is a test"; $body = "hi, \n I'm so glad you received this"; $success = mail($to,$subject,$body); ?> <P> <?php if($success){ print("mail was sent"); }else{ print("mail was NOT sent"); } ?> Previous Comments: ------------------------------------------------------------------------ [2002-03-19 00:00:02] php-bugs at lists dot php dot net No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". ------------------------------------------------------------------------ [2002-02-27 04:44:44] milamamu at tiscalinet dot it Try change \n with \r\n ------------------------------------------------------------------------ [2002-01-25 11:50:23] [EMAIL PROTECTED] Check your SMTP settings. Probably the mailserver refuses your message. Check if authentication is needed and more like that. ------------------------------------------------------------------------ [2002-01-25 07:20:27] dansixus at yahoo dot com The mail() function does not seem to work. I am getting this error: Warning: Unknown error in c:\apache\htdocs\auctions\mailtest.php on line 2 Mailtest.php contains the following: <?php mail("[EMAIL PROTECTED]", "PHP Mail test", "Line 1\nLine 2\nLine 3"); ?> My PHP.ini mail function settings seem to be ok too: SMTP: mail.keyworld.net sendmail_from = [EMAIL PROTECTED] I am using PHP 4.1.1 under apache. Other PHP scripts work fine but this mail function does not work. Please help me fix this problem ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=15221&edit=1