Click to See Complete Forum and Search --> : PHP & IIS4.0 SMTP Service


Anon
09-19-2000, 03:16 AM
I'm having trouble getting PHP to send mail on NT4/IIS4.0

Windows NT4 Enterprise - i keep getting a 'failed to connect' error from the mail function.

I've edited the server name, trying :

localhost - didn't work
ip - didn't work
ip & port number - crashed server
machine name - crashed server

are there any permissions that PHP requires to be able to send mail from IIS?

j

Anon
09-19-2000, 11:00 AM
Assuming you're using PHP4, the mail() function works fine if you have your PHP.INI configured properly to point to an SMTP server. At least, that's been my experience thus far.

A useful little article on this by Julie Meloni (author of PHP Essentials, the 1st book I bought on PHP) can be had at

http://www.thickbook.com/extra/php_email.phtml

Don't know if it'll help you or not, but I found her explanation of mail() to be quite helpful. And as I said, be sure you have PHP.INI configured properly to point to an SMTP server;

e.g.
____________________________________________________________
...
[mail function]
SMTP = smtp.yourdomain.com
; *** MODIFIED from 'localhost' ***
; for win32 only
sendmail_from = you@yourdomain.com
; *** MODIFIED from 'me@localhost.com' ***
; for win32 only
;sendmail_path = ;for unix only, may supply arguments as well
; (default is sendmail -t)
...
____________________________________________________________

I found this tends to be the biggest problem most people have.

Anon
09-19-2000, 10:08 PM
I figured it out eventually. my original smtp settings were fine, but php3 requires the fourth argument of the mail() function, for some reason. why it isn't documented as such, i don't know

oh well

j