Page 1 of 1

Mail() under IIS

Posted: Mon Feb 10, 2003 10:59 am
by ofernand
I would like send a email via the function mail() under windows 2000 with IIS5. Is it necessary to have a server of mail. And how configure php to use it? Where i can find some documentation about this function.
:?

Posted: Mon Feb 10, 2003 11:07 am
by cctrax
As for the documentation...your best bet may be the configuration section of the PHP Manual (http://www.php.net). And yes - you are going to need some type of mail server built into your system in order to use this bad boy.

Posted: Tue Feb 11, 2003 2:20 am
by twigletmac
You may also be able to setup PHP to use the SMTP server of your ISP.

Mac

Posted: Wed Feb 12, 2003 11:24 am
by ofernand
Is it possible to use php with microsoft exchange for smtp and pop protocole (intranet). And if not wich mail server i can use (under windows).
olivier :?:

Posted: Thu Feb 13, 2003 2:09 am
by twigletmac
If you have the address of your SMTP server you just need to edit your php.ini to reflect it and then try the mail() function to see if it will work.

More info:
http://www.php.net/manual/en/function.mail.php
http://www.php.net/manual/en/configurat ... ation.file

You need to configure this part of the php.ini:

Code: Select all

їmail function]
; For Win32 only.
SMTP = localhost

; For Win32 only.
sendmail_from = me@localhost.com
replacing SMTP and sendmail_from with the correct values.

Mac

Posted: Thu Feb 13, 2003 4:14 pm
by bowhuntr
IIS can be installed with it's own SMTP server also. To find out if yours does if you are not sure just telnet to IP address of IIS server on port 25

example telnet 192.168.1.1 25

220 IISserver.mydomain.com Microsoft ESMTP MAIL Service, Version: 5.0.2195.2966 ready at Thu, 13 Feb 2003 17:12:58 -0500

If you get a response similar to that then you should be able to set that server up in your php.ini file as the smtp server.