note 78616 deleted from ref.mail by nlopess
| From: | nlopess@php.net | Date: | Fri, 19 Oct 2007 18:53:07 +0000 |
| Subject: | note 78616 deleted from ref.mail by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-131553@lists.php.net to get a copy of this message | ||
Note Submitter: Jason
----
Hello,
I have got a problem with my mail function:
I don't know what is going on. Very strange:
I am running an IIS6 server on Windows server 2003 with php 5.2.4 on it.
In my php.ini file (it is in my php default folder c:\Inetpub\php)
I turned the "SMTP localhost" into SMTP 192.168.1.107 (the adress of my mail server)
I have got the same message all the time, even if I reboot my IIS services:
"Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port
25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in
C:\Inetpub\Mes sites Web5\test2.php on line 8
Fatal error: Call to undefined function user_init() in C:\Inetpub\Mes sites Web5\test2.php on line 9
"
I can read the phpinfo.php in the same folder. It says that the SMTP adress is
"localhost"...
My test2.php is like this :
<?php
$TO = "jloire@partnaire.fr";
$SO = "imprimes@partnaire.fr";
$h = "From: " . $SO;
$subject = "Commande d'imprimés";
while (list($key, $val) = each($HTTP_POST_VARS)) {
$message .= "$key : $val\n";
}
mail($TO, $subject, $message, $h);
Header("Location: http://192.168.1.105");
?>
I don't really know what to do anymore, I spent several days on google trying to figure out why
this happens..
Thank you very much for your help