Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a Windows XP machine that I have installed IIS 5.1 on and setup my own website to.

I would like to install PHP so that I can use some the the features of it, one in particular is the SendMail feature.

Can someone please explain to me (in plain english as I don't know anything about setting up PHP) of how to go about setting this up on the PC.

Thanks for any help.

share|improve this question

closed as off topic by EEAA, womble, John Gardeniers, Shane Madden, Chris S Aug 11 '11 at 18:38

Questions on Server Fault are expected to relate to server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

No offense but you're doing it wrong. Get a VPS with ubuntu server. – Tom Dignan Aug 11 '11 at 3:17
All your questions indicate that you have no desire to put any real effort into what you're doing. You expect others to simply supply the solution for you. Please read the FAQ. This site is for professionals and you very clearly do not fit that category. – John Gardeniers Aug 11 '11 at 4:34
"Windows XP", "IIS 5.1" and "Sendmail" in one question! Come on, it's 2011 not the stone age. – mailq Aug 11 '11 at 8:32
up vote 2 down vote accepted

There two ways for you if you need mail() working in PHP:

  1. Use connection to SMTP over TCP as described in previous answer. In my opinion it's better to use SMTP service wich comes with windows since XP (IIS component called SMTP service).
  2. Or you can use on windows like Xmail , in this case you can use path to sendmail.exe as sendmail_path argument in your php.ini.
share|improve this answer

First of all, I suppose this is for testing purposes, if not, installing and securing a web hosting in your home or office is not a good idea, unless you really know what you are doing.

So, install PHP following the installation instructions Then open the shell (cmd.exe) and run :

c:\>php --ini
Configuration File (php.ini) Path: C:\Windows
Loaded Configuration File:         C:\Program Files (x86)\Zend\ZendServer\etc\php.ini
Scan for additional .ini files in: (none)
Additional .ini files parsed:      (none)

So, in my installation the configuration file is C:\Program Files (x86)\Zend\ZendServer\etc\php.ini In the configuration file, add or modify this fields:

smtp_port = 25

Then every time you call the function mail() from a php script, will try to send the email using this configuration.

IF YOU DONT HAVE A SMTP SERVER, you will need one. IIS does not provide an SMTP server as far as I know, it use to, but if I'm not mistaken, you need MS Exchange now...

share|improve this answer
Actually, IIS does include a SMTP option. It is sometimes grouped as part of the IIS optional components depending on the version of Windows. – user48838 Aug 11 '11 at 6:55

Not the answer you're looking for? Browse other questions tagged or ask your own question.