I installed php on my Windows-ME machine. Most of it works properly. One
problem is that the mail function doesn't work. I used:
mail("[EMAIL PROTECTED]", "My Subject", "Line 1\nLine 2\nLine 3").
Below is how I setup php, smtp server address added to php.ini, php
program I tested, and its output.
How could I get mail() function to work?
Pierre Fortier
[EMAIL PROTECTED]
Summary of setup
- created directory C:\PROGRA~1\Sambar\Php which contains the files
install.txt
php.exe
php4isapi.dll
License
Test.php
and directories uploadtemp and sessiondata
- php.ini is in \windows directory
- php4ts.dll is in the system directory
- autoexec.bat file contains
SET PHPRC=C:\PROGRA~1\Sambar\Php
and C:\PROGRA~1\Sambar\Php; in the PATH definition
- C:\PROGRA~1\Sambar\config\mappings.ini has the following entry
*.php = C:\PROGRA~1\Sambar\Php\php4isapi.dll
php.ini includes
[mail function]
SMTP= smtp-out.uottawa.ca
PHP program http://hawk.med.uottawa.ca/MailTest.php
<html>
<head>
<title>Example</title>
</head>
<body>
<?php
$i=10;
echo "Hi, I'm a PHP script! I'm $i times better than ASP
scripting!<p>";
for ($i = 1; $i <= 10; $i++) {
printf("%d times<br>\n", $i);
}
mail("[EMAIL PROTECTED]", "My Subject", "Line 1\nLine 2\nLine 3");
?>
</body>
</html>
Output:
Hi, I'm a PHP script! I'm 10 times better than ASP scripting!
1 times
2 times
3 times
4 times
5 times
6 times
7 times
8 times
9 times
10 times
Warning: Unknown error in c:\users\server\MailTest.php on line 16
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]