hi... the reason that mail() wont work on windows without an smtp server (outgoing mail server) is because normally windows doesnt have a mail server installed. the default smtp settings in php.ini usually is for *nix systems (that is if it is even set).
it is very easy to fix: go into c:\windows\php.ini or wherever you had put it at and search for the section [mail function]. in that section there will be a line that looks like this: smtp= all you need to do is add your outgoing mail server to that line (you can use the one that outlook express uses if you want) or call your ISP and ask them what smtp server to use. ----- Original Message ----- From: "Shawn Inder" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, April 24, 2004 1:02 AM Subject: [PHP] Question about the mail() php function > Hello, > I was browsing your site and came across the mail() PHP function. I tryed it > out: > > <?php > mail("[EMAIL PROTECTED]", "My Subject", "Line 1\nLine 2\nLine 3"); > ?> > > [EMAIL PROTECTED] is my e-mail adress, obviously enough.. > The problem is, the e-mail doesn't get sent. > A warning appears on the page: > > Warning: 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:\Program Files\Abyss Web Server\htdocs\page.php on line 24 > > What is this all about? Why wont it work? > Thanks you very much > > If this is not the right place to send a question, please tell me where that > right place would be :) > > shlagish (or Shawn, you choose) > > _________________________________________________________________ > STOP MORE SPAM with the MSN Premium and get 2 months FREE* > http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php