php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19822 Server error using mail() function and ISAPI
Submitted: 2002-10-08 14:39 UTC Modified: 2002-10-26 01:00 UTC
Votes:4
Avg. Score:4.8 ± 0.4
Reproduced:4 of 4 (100.0%)
Same Version:3 (75.0%)
Same OS:3 (75.0%)
From: logico at avantel dot net Assigned:
Status: No Feedback Package: IIS related
PHP Version: 4.2.3 OS: Windows 2000 Server SP3
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: logico at avantel dot net
New email:
PHP Version: OS:

 

 [2002-10-08 14:39 UTC] logico at avantel dot net
I want to use the mail function but it always trigger the following warning:

Warning: Server Error in D:\Web\phpcollab\mail.php on line 3

I tried to run PHP as ISAPI and CGI and it's the same problem.

The source of mail.php is:
<?php

mail ("logico@avantel.net", "My subject", "Line 1\nLine 2\nLine 3");

?>

I'm almost sure that this is a bug because I've installed PHP plenty of times in different machines and it's the first time I have this problem.

Thank you in advance!

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-10-08 15:10 UTC] iliaa@php.net
The error you are seeing implies that there somekind of a problem using the SMTP server you've specified in you php.ini. Please verify that the specified SMTP server is avaliable and working correctly.
 [2002-10-08 15:49 UTC] logico at avantel dot net
Thank you for replying!

That's not the problem because go the the cmd and type:

telnet smtp.uservers.net 25

And it connects perfectly, I can do all the HELO, TO, RCPT, etc... and it works without a problem
 [2002-10-08 17:22 UTC] sniper@php.net
Are you sure your php.ini file is read by PHP?
Check from the phpinfo() output to what value SMTP is set.

 [2002-10-10 02:36 UTC] mfischer@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip

The latest NON-STABLE snapshot contains a more improved error handling so instead of the useless "server error" you will get the real error message from the server.

Looking briefly at your line I think you're either missing an SMTP directive or the "sendmail_from" directive which both are required for Win32.
 [2002-10-10 10:33 UTC] logico at avantel dot net
Thank you! using the snap shot actually helped me out a little bit, right now I know the problem:

Warning: mail() [function.mail]: SMTP server response: 451 See http://pobox.com/~djb/docs/smtplf.html. in D:\Web\phpcollab\mail.php on line 3

But now I need to know how to solve it!, I've been using PHP for a while and this is the first this happens to me, so I suppose that is a Win2k SP3 IIS problem.

Thank you in advance!
 [2002-10-10 10:39 UTC] mfischer@php.net
You are using "\n" instead of "\r\n".

The page http://cr.yp.to/docs/smtplf.html exactly describes this issue.

One thing which bothers me is that actually PHPs sendmail code should take care of this issue.

Can you post an url pointing to the minimal sourcecode you're trying to send?

Also which SMTP are you using (can I use it for testing too) ?
 [2002-10-26 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over 2 weeks, 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".
 [2003-07-14 22:51 UTC] shovey at frontiernet dot net
I am getting the same exact problem.
I am running a Nuke 6.5 powered site and any time the php performs the mail function I get the same exact error about LF.

I used that sample code for mail.php both ways........in original format and then modified it for \r\n and it worked perfectly after replacing the \n  with \r\n.

How can I easily fix this issue without editing the source for all of my nuke web site just so sendmail works?


By the way, I am running a web site on my local computer and have no domain registered. I am on a dynamic IP. So if you e-mail me on the day you want to check out my error, I will reply back with the current ip address to connect to.

Thank you in advance,
Steve
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Mon Dec 06 18:03:34 2021 UTC