1

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.

3
  • No offense but you're doing it wrong. Get a VPS with ubuntu server. Aug 11, 2011 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. Aug 11, 2011 at 4:34
  • 1
    "Windows XP", "IIS 5.1" and "Sendmail" in one question! Come on, it's 2011 not the stone age.
    – mailq
    Aug 11, 2011 at 8:32

2 Answers 2

2

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 http://xmailserver.org/ , in this case you can use path to sendmail.exe as sendmail_path argument in your php.ini.
1

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 = mail.mydomain.com
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...

1
  • 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, 2011 at 6:55

Not the answer you're looking for? Browse other questions tagged .