Mail() under IIS
Moderator: General Moderators
Mail() under IIS
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.

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.
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
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:
replacing SMTP and sendmail_from with the correct values.
Mac
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.comMac
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.
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.