mail function problem

From: Date: Sun, 19 Aug 2001 16:56:24 +0000
Subject: mail function problem
Groups: php.windows 
Request: Send a blank email to php-windows+get-8939@lists.php.net to get a copy of this message
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("pfortier@uottawa.ca", "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 pfortier@uottawa.ca 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("pfortier@uottawa.ca", "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

« previous php.windows (#8939) next »