#14954 [Com]: Warning: Server Error with mail() function

From: Date: Thu, 13 Mar 2008 07:30:40 +0000
Subject: #14954 [Com]: Warning: Server Error with mail() function
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-123249@lists.php.net to get a copy of this message
ID: 14954 Comment by: permander dot kumar at yahoo dot co dot in Reported By: jberall at yahoo dot com Status: No Feedback Bug Type: Mail related Operating System: Windows 2000 PHP Version: 4.1.0 New Comment: dfdfd Previous Comments: ------------------------------------------------------------------------ [2004-07-01 22:57:43] cleilton at secrel dot net dot br I have the same problem using php 4.2, windows 2000 server iis5. I resolve the problem using \r\n not \n for the break line. Example: mail("cleilton_ce@hotmail.com", "My Subject", "Line 1\nLine 2\nLine 3"); This code results in a server error Correct code: $email = mail("cleilton_ce@hotmail.com", "My Subject", "Line 1\r\nLine 2\r\nLine 3"); If ($email){ echo "E-mail was sent!"; } :-) ------------------------------------------------------------------------ [2002-07-03 01:00:08] 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-06-02 13:51:03] mfischer@php.net Error handlig has been improvied, please try a snapshot from http://snaps.php.net/win32/php4-win32-latest.zip ------------------------------------------------------------------------ [2002-01-09 17:10:07] jberall at yahoo dot com The mail() function doesn't work properly. Every so often it does send mail. I tried putting the php.ini in the c:\php\php.ini instead of the c:\winnt\php.ini but that didn't help. I've been at it a while and I've found no solutions on the web yet, while other people have encountered the same issue. PHP.INI has a valid SMTP = mail.pnang.com and sendmail_from = jberall@yahoo.com. The code mail("jberall@yahoo.com", "My Subject", "Line 1\nLine 2\nLine 3"); And the birthday one from the manual. Again the frustrating part is it worked last night. My outlook works perfectly with the same SMTP. Thanks, Jonathan ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=14954&edit=1

« previous php.bugs (#123249) next »