[PHP] Server error when executing mail() function
Hi, I keep getting a 'Server Error' when executing the mail() function. I thought the problem was the SMTP server in php.ini, so I've tried several alternatives (including my Outlook smtp and free smtp servers). I'm starting to think that it's not that that's causing the problem. Is there anything else that can cause the same error? Info: OS: Win98 PHP Version: 4.1.2 Web Server: Apache/1.3.6 (Win32) Browser: MSIE 6.0 Regards, Paul Cuthbertson.
Re: [PHP] Server error when executing mail() function
Is 'Server Error' all you get? If there's more, please post the whole error message. ;-) thanks! tyler - Original Message - From: "Paul Cuthbertson" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, May 28, 2002 9:06 AM Subject: [PHP] Server error when executing mail() function Hi, I keep getting a 'Server Error' when executing the mail() function. I thought the problem was the SMTP server in php.ini, so I've tried several alternatives (including my Outlook smtp and free smtp servers). I'm starting to think that it's not that that's causing the problem. Is there anything else that can cause the same error? Info: OS: Win98 PHP Version: 4.1.2 Web Server: Apache/1.3.6 (Win32) Browser: MSIE 6.0 Regards, Paul Cuthbertson. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Server error when executing mail() function
I'm afraid all I get is: Warning: Server Error in d:\htdocs\scriptname.php on line 19 Line 19 being the mail() command. The script works fine on a different server. Any Ideas? Paul. - Original Message - From: "Tyler Longren" <[EMAIL PROTECTED]> To: "Paul Cuthbertson" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: 28 May 2002 16:14 Subject: Re: [PHP] Server error when executing mail() function > Is 'Server Error' all you get? > If there's more, please post the whole error message. ;-) > > thanks! > tyler > > - Original Message - > From: "Paul Cuthbertson" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Tuesday, May 28, 2002 9:06 AM > Subject: [PHP] Server error when executing mail() function > > > Hi, > > I keep getting a 'Server Error' when executing the mail() function. I > thought the problem was the SMTP server in php.ini, so I've tried several > alternatives (including my Outlook smtp and free smtp servers). I'm starting > to think that it's not that that's causing the problem. Is there anything > else that can cause the same error? > > Info: > OS: Win98 > PHP Version: 4.1.2 > Web Server: Apache/1.3.6 (Win32) > Browser: MSIE 6.0 > > Regards, > > Paul Cuthbertson. > > >
Re: [PHP] Server error when executing mail() function
Try this thread on phpbuilder.com: http://www.phpbuilder.com/forum/read.php3?num=4&id=6681&loc=0&thread=6681 One person suggests using fewer headers as windows can be picky about which headers you're trying to send with your e-mail. Good luck, Tyler Longren Captain Jack Communications www.captainjack.com [EMAIL PROTECTED] - Original Message - From: Paul Cuthbertson To: [EMAIL PROTECTED] ; Tyler Longren Sent: Tuesday, May 28, 2002 10:27 AM Subject: Re: [PHP] Server error when executing mail() function I'm afraid all I get is: Warning: Server Error in d:\htdocs\scriptname.php on line 19 Line 19 being the mail() command. The script works fine on a different server. Any Ideas? Paul. - Original Message - From: "Tyler Longren" <[EMAIL PROTECTED]> To: "Paul Cuthbertson" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: 28 May 2002 16:14 Subject: Re: [PHP] Server error when executing mail() function > Is 'Server Error' all you get? > If there's more, please post the whole error message. ;-) > > thanks! > tyler > > - Original Message - > From: "Paul Cuthbertson" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Tuesday, May 28, 2002 9:06 AM > Subject: [PHP] Server error when executing mail() function > > > Hi, > > I keep getting a 'Server Error' when executing the mail() function. I > thought the problem was the SMTP server in php.ini, so I've tried several > alternatives (including my Outlook smtp and free smtp servers). I'm starting > to think that it's not that that's causing the problem. Is there anything > else that can cause the same error? > > Info: > OS: Win98 > PHP Version: 4.1.2 > Web Server: Apache/1.3.6 (Win32) > Browser: MSIE 6.0 > > Regards, > > Paul Cuthbertson. > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Server error when executing mail() function
Firstly, thank you for the continued help. Unfortunately I just tried this: ..and the error still occurred. The error appears immediately, as if it's not even trying to connect to anything. Paul. - Original Message - From: "Tyler Longren" <[EMAIL PROTECTED]> To: "Paul Cuthbertson" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: 28 May 2002 16:34 Subject: Re: [PHP] Server error when executing mail() function > Try this thread on phpbuilder.com: > http://www.phpbuilder.com/forum/read.php3?num=4&id=6681&loc=0&thread=6681 > > One person suggests using fewer headers as windows can be picky about which > headers you're trying to send with your e-mail. > > Good luck, > Tyler Longren > Captain Jack Communications > www.captainjack.com > [EMAIL PROTECTED] > > - Original Message - > From: Paul Cuthbertson > To: [EMAIL PROTECTED] ; Tyler Longren > Sent: Tuesday, May 28, 2002 10:27 AM > Subject: Re: [PHP] Server error when executing mail() function > > > I'm afraid all I get is: > > Warning: Server Error in d:\htdocs\scriptname.php on line 19 > > Line 19 being the mail() command. The script works fine on a different > server. Any Ideas? > > Paul. > > > - Original Message - > From: "Tyler Longren" <[EMAIL PROTECTED]> > To: "Paul Cuthbertson" <[EMAIL PROTECTED]>; > <[EMAIL PROTECTED]> > Sent: 28 May 2002 16:14 > Subject: Re: [PHP] Server error when executing mail() function > > > > Is 'Server Error' all you get? > > If there's more, please post the whole error message. ;-) > > > > thanks! > > tyler > > > > - Original Message - > > From: "Paul Cuthbertson" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Tuesday, May 28, 2002 9:06 AM > > Subject: [PHP] Server error when executing mail() function > > > > > > Hi, > > > > I keep getting a 'Server Error' when executing the mail() function. I > > thought the problem was the SMTP server in php.ini, so I've tried several > > alternatives (including my Outlook smtp and free smtp servers). I'm > starting > > to think that it's not that that's causing the problem. Is there anything > > else that can cause the same error? > > > > Info: > > OS: Win98 > > PHP Version: 4.1.2 > > Web Server: Apache/1.3.6 (Win32) > > Browser: MSIE 6.0 > > > > Regards, > > > > Paul Cuthbertson. > > > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Server error when executing mail() function
I was having this same problem a few weeks ago and ended up giving up. After reading the response about the headers i decided to try it. If i call this it works: mail($recipient, $subject); If i call this is gets the server error msg: mail($recipient, $subject, $headers); In that case their are like 10 headers but none of them are ended properly with CRLF. Hope this helps -Jared -Original Message- From: Paul Cuthbertson [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 28, 2002 11:49 AM To: Tyler Longren; [EMAIL PROTECTED] Subject: Re: [PHP] Server error when executing mail() function Firstly, thank you for the continued help. Unfortunately I just tried this: ..and the error still occurred. The error appears immediately, as if it's not even trying to connect to anything. Paul. - Original Message - From: "Tyler Longren" <[EMAIL PROTECTED]> To: "Paul Cuthbertson" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: 28 May 2002 16:34 Subject: Re: [PHP] Server error when executing mail() function > Try this thread on phpbuilder.com: > http://www.phpbuilder.com/forum/read.php3?num=4&id=6681&loc=0&thread=6681 > > One person suggests using fewer headers as windows can be picky about which > headers you're trying to send with your e-mail. > > Good luck, > Tyler Longren > Captain Jack Communications > www.captainjack.com > [EMAIL PROTECTED] > > - Original Message - > From: Paul Cuthbertson > To: [EMAIL PROTECTED] ; Tyler Longren > Sent: Tuesday, May 28, 2002 10:27 AM > Subject: Re: [PHP] Server error when executing mail() function > > > I'm afraid all I get is: > > Warning: Server Error in d:\htdocs\scriptname.php on line 19 > > Line 19 being the mail() command. The script works fine on a different > server. Any Ideas? > > Paul. > > > - Original Message - > From: "Tyler Longren" <[EMAIL PROTECTED]> > To: "Paul Cuthbertson" <[EMAIL PROTECTED]>; > <[EMAIL PROTECTED]> > Sent: 28 May 2002 16:14 > Subject: Re: [PHP] Server error when executing mail() function > > > > Is 'Server Error' all you get? > > If there's more, please post the whole error message. ;-) > > > > thanks! > > tyler > > > > - Original Message - > > From: "Paul Cuthbertson" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Tuesday, May 28, 2002 9:06 AM > > Subject: [PHP] Server error when executing mail() function > > > > > > Hi, > > > > I keep getting a 'Server Error' when executing the mail() function. I > > thought the problem was the SMTP server in php.ini, so I've tried several > > alternatives (including my Outlook smtp and free smtp servers). I'm > starting > > to think that it's not that that's causing the problem. Is there anything > > else that can cause the same error? > > > > Info: > > OS: Win98 > > PHP Version: 4.1.2 > > Web Server: Apache/1.3.6 (Win32) > > Browser: MSIE 6.0 > > > > Regards, > > > > Paul Cuthbertson. > > > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Server error when executing mail() function
Hi All, I've now fixed the problem myself. It appears as though the problem was in the 'sendmail_from' element of php.ini. Even though the address I gave on that line was a perfectly legitimate email address, once I changed it, it worked fine. The new address was longer than the old, so it wasn't a problem with the length. I have no idea why it happened, it's quite annoying that it did cos it would be loads better for me if it accepted the original one. Oh well. Cheers for all the help I received. Paul. > - Original Message - > From: Paul Cuthbertson > To: [EMAIL PROTECTED] ; Tyler Longren > Sent: Tuesday, May 28, 2002 10:27 AM > Subject: Re: [PHP] Server error when executing mail() function > > > I'm afraid all I get is: > > Warning: Server Error in d:\htdocs\scriptname.php on line 19 > > Line 19 being the mail() command. The script works fine on a different > server. Any Ideas? > > Paul. > > > - Original Message - > From: "Tyler Longren" <[EMAIL PROTECTED]> > To: "Paul Cuthbertson" <[EMAIL PROTECTED]>; > <[EMAIL PROTECTED]> > Sent: 28 May 2002 16:14 > Subject: Re: [PHP] Server error when executing mail() function > > > > Is 'Server Error' all you get? > > If there's more, please post the whole error message. ;-) > > > > thanks! > > tyler > > > > - Original Message - > > From: "Paul Cuthbertson" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Tuesday, May 28, 2002 9:06 AM > > Subject: [PHP] Server error when executing mail() function > > > > > > Hi, > > > > I keep getting a 'Server Error' when executing the mail() function. I > > thought the problem was the SMTP server in php.ini, so I've tried several > > alternatives (including my Outlook smtp and free smtp servers). I'm > starting > > to think that it's not that that's causing the problem. Is there anything > > else that can cause the same error? > > > > Info: > > OS: Win98 > > PHP Version: 4.1.2 > > Web Server: Apache/1.3.6 (Win32) > > Browser: MSIE 6.0 > > > > Regards, > > > > Paul Cuthbertson. > > > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php