Jump to content

Test mail function on Win XP IIS


Recommended Posts



I am building php pages on winxp with IIS.

1. I have downloaded and configured PHP and I am able to view my pages in IIS.

2. One of my php pages uses a mail function to send form info to an email, I have written a code for that

3. In my PHP.ini file, I have:


SMTP = localhost

smtp_port = 25

sendmail_from = me@example.com


4. In my SMTP settings I have added to both connection and relay under Access tab of SMTP properties.

5. SMTP is running


Now, I don't know how to test my mail function to see if I am able to send mail. Can you please help me?


Very very confused PHP beginner



Link to comment
Share on other sites




The best method would be to enable SMTP logging from within IIS Manager. Once you've enabled the logging of the SMTP traffic for the local mail server, you can then use you PHP mail() test page & check the log.



Below is a quick script mail() example if needed:


if(mail('user@mydomain.com','test subject','test message')){
      echo('not ok');






Link to comment
Share on other sites

This thread is more than a year old.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.