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 = [email protected]

 

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
https://forums.phpfreaks.com/topic/162238-test-mail-function-on-win-xp-iis/
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('[email protected]','test subject','test message')){
      echo('ok');
    }
else{
      echo('not ok');
    }
?>

 

 

 

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.