Evrim Posted June 15, 2009 Share Posted June 15, 2009 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 Quote Link to comment https://forums.phpfreaks.com/topic/162238-test-mail-function-on-win-xp-iis/ Share on other sites More sharing options...
jxrd Posted June 15, 2009 Share Posted June 15, 2009 Just try and email yourself something. Quote Link to comment https://forums.phpfreaks.com/topic/162238-test-mail-function-on-win-xp-iis/#findComment-856225 Share on other sites More sharing options...
BMurtagh Posted June 23, 2009 Share Posted June 23, 2009 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'); } ?> Quote Link to comment https://forums.phpfreaks.com/topic/162238-test-mail-function-on-win-xp-iis/#findComment-861719 Share on other sites More sharing options...
Evrim Posted June 25, 2009 Author Share Posted June 25, 2009 Thank you for your replies Quote Link to comment https://forums.phpfreaks.com/topic/162238-test-mail-function-on-win-xp-iis/#findComment-863335 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.