php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11779 mail() returns an "Unknown error ..." in line [mail(...)]
Submitted: 2001-06-28 10:05 UTC Modified: 2001-07-04 05:44 UTC
From: sven at svenrunge dot de Assigned:
Status: Not a bug Package: Mail related
PHP Version: 4.0.6 OS: Win 2000
Private report: No CVE-ID: None
 [2001-06-28 10:05 UTC] sven at svenrunge dot de
Hello!

i hope its really a bug and not a documentation problem, but I did'nt found a way to solve the problems in several php web sites, manuals or newsgroups :-(

My system:
Windows 2000
PHP 4.0.6 (win32 binary downloaded from php.net)
Apache 1.3.12 an IIS (Win2000-included)
   I used both! webservers  on different ports, I got exactly the same result!

I want to create a mail while using this code:
-------------------------------------
<script language="php">
    echo ("--- line before mail function ---");
    mail ("sven@svenrunge.de", "PHP mail test","test mail body");
    echo ("--- line after mail function ---");
</script>
-------------------------------------

I got this result:
--------------------------------------
--- line before mail function ---
Warning: Unknown error in C:\Inetpub\wwwroot\phproot\mail.php on line 17
--- line after mail function --- 

In the php.ini I changed the SMTP entry several times. I could change it in a valid, an invalid mailserver or i commentet it out (;SMTP = ]), I always got the same result.
For me It seems that the php engine ignores the SMTP entry.

I didn't got help in the php newsgroups, so I think it is'nt a simple problem.
So I hope you can help me.

Best regards

Sven Runge, Germany
----------------------------------------
E-Mail: sven@svenrunge.de

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-28 10:22 UTC] sven at svenrunge dot de
If i change the count of parameters to two, I get this Result:
--- line before mail function ---
Warning: Wrong parameter count for mail() in C:\Inetpub\wwwroot\phproot\mail.php on line 17
--- line after mail function --- 

Best regards

Sven Runge
 [2001-07-04 05:36 UTC] sven at svenrunge dot de
It wasn't a bug.
I placed the php.ini in winnt\system32, not in winnt.
Now it's on the right place and it works.
Sorry, best wishes for php.
Sven Runge
 [2001-07-04 05:44 UTC] cynic@php.net
user error -> bogus
 [2002-07-10 11:06 UTC] wehner at networkers dot de
After updating from PHP 4.0.4pl1 to PHP 4.2.1 I got the
same error message. The solution for this problem was
to move php.ini from c:/ to c:/winnt.
New Versions of PHP are looking for php.ini on other
places than old versions.
 [2004-10-20 15:44 UTC] ncr at db9 dot dk
always verify where your php.ini are located

you may see the location if runing the phpinfo(); command from a script
e.g.

info.php:
<?php
phpinfo();
?>
 
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Sat Oct 20 08:01:25 2018 UTC