Hi there. I just installed WAMP on my Windows 7 PC and php is configured and installed working fine on a localhost.

Now I am not able to send emails using PHP. I know we need to do something with SMTP on the IIS but I cannot run IIS coz WAMP is running on this machine and we cannot run both IIS and WAMP together.

Because if I run IIS and then run WAMP, it can't be run, as it says port 80 used by IIS.

How can I do it? I have the code of sending email using PHP but the email just wouldn't go.

It is only a matter of SMTP setup. But how?

Can i use a remote SMTP on my localhost can I do some other thing.

Please its been almost a week and still scratching my head.

Please reply.

Thank you!

    You need an SMTP server to send mail, yes.

    If you're just looking to test your scripts locally while developing them, one option might be to use your ISP's SMTP servers to send the e-mails. Note that many ISPs require authentication to use their SMTP servers; if this is the case, you won't be able to use the internal mail() function and must instead use some 3rd party class (e.g. PHPMailer) that supports SMTP authentication.

      Pear::Mail is a good SMTP mail client. I have recently found that it works better than PHPMailer.

        Out of curiosity, can you elaborate on how it works "better" than PHPMailer? Either the message is sent or it's not... I don't understand how one works "better" than another?

          Using PHPMailer, I was unable to authenticate with a particular SMTP server due to some handshaking problem. I googled the problem and learned that PHPMailer had a problem like this sometimes. I tried using Pear::Mail instead and it authenticated perfectly. So "better" in this case means that Pear::Mail sent the email and PHPMailer did not.

            If you're already using IIS as your web server, you didn't need to install the Apache web server as well (which is what the 'A' in WAMP stands for). It sounds more as though you should just install PHP (and maybe MySQL as well, if you're planning to use that) separately. It makes little sense to install two web servers (especially if they're both configured to listen on port 80) on the same machine.

              Write a Reply...