> I think the problem is the installation or configuration, if I use the > mail() function I doesn't run, I've changed configurations, permisions, etc. > but nothing. > > The system is a Win2k Server with IIS5 including its own SMTP server, after > I've installed PHP 4.0.6 (the automatic installation) I didn't change > anything in the regedit or in the php.ini file. > > I'm starting with PHP and I'm ussing a code from the book PHP and MySQL Web > Development by Luke Welling, Laura Thomson (Chapter 4)
Buenos dios Carlos, Wow, similar systems, and now the same text book. Better not compare how we style our hair, or people will begin to think we're twins! (and that would ruin your reputation!) Regardless of the depth of your PHP knowledge, I would suggest that you scoot along to Chapters 27 and 28 because that early coverage of mail() is a bit basic/overview. I became more confident by 'reading ahead'. Also have a look around the PHP web sites. One of the regular contributors here, Richard Heyes (?sp/apologies) has made available a set of email classes for PHP. Until I downloaded that (and read all the RFCs etc he recommends) there were aspects of the default systems (to transmit) email that I just didn't 'get' - but then, maybe that was just 'me'!? I have not used IIS' built in SMTP (knowingly) figuring that any of Microsoft's 'Express' (read as "cut-down", or in the words of the Pentagon "eviscerated") products are best treated with maximum care and minimum expectation. Accordingly I have plugged into a 'remote' mail server (cf 'localhost'), but the methods are the same within PHP, so it shouldn't matter. However it would be an idea to first check that the mail server is working through IIS' management facilities before try to pipe through from PHP. Do not going messing in RegEdit/Registry unless you absolutely have to (standard advice). You mentioned the php.ini (which should be located in C:\WinNT) so let's start there. Have a look for this section of the .INI file and modify it to suit your own naming convention: ---------- [mail function] ; For Win32 only. SMTP = smtp.DomainNm.TLD[.NationalCode] ; For Win32 only. sendmail_from = [EMAIL PROTECTED][.NationalCode] ---------- These lines point PHP at your SMTP 'outbound' email server, and give an administrative return address (see Richard's notes/tutorial). Does it make the difference? =dn -- 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]