Jump to content

Test mail function on Win XP IIS


Evrim

Recommended Posts

Hi

 

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 127.0.0.1 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

Thanks

 

Link to comment
Share on other sites

Hi,

 

 

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:

 

<?php
if(mail('user@mydomain.com','test subject','test message')){
      echo('ok');
    }
else{
      echo('not ok');
    }
?>

 

 

 

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

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

Guest
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.