PHP not sending mail with local SMTP
Hi, I hope someone can help I have set up an IIS server on 2008R2, and included the standard SMTP (with the IIS6) and PHP as well. The PHP works, beautifully. The SMTP works, beautifully. However, they don't seem to work together. I am able to use the SMTP server to send mail from a office MFP for scanning as well as from MS Outlook 2010 with no trouble at all. PHP works, I have it accessing ODBC databases and all so no apparent issues there. On a basic webpage, I set up the following: <html> <body> <?php if (mail("me@example.com","Test Subject","Test body")) {echo "success";} else {echo "failed";} ?> </body> <html> All I end up with is "failed" on the page. I have added the following into the PHP.ini I found in "C:\Program Files (x86)\PHP\v5.3\" [mail function] SMTP = localhost smtp_port = 25 sendmail_from = no-reply@example.com I have no idea where to go hunting for the PHP logs to find out what happened and why. Any help would be appreciated
May 17th, 2012 2:52am

IMHO the problem is in initial configuration of install process of IIS. Could you specify, which features you have enabled? My guess is that CGI is missing. For configuration see http://blogs.iis.net/bills/archive/2006/09/19/How-to-install-PHP-on-IIS7-_2800_RC1_2900_.aspx More on IIS and related material (incl. PHP Manager) is on official IIS pages here http://www.iis.net/ Regards Milos
Free Windows Admin Tool Kit Click here and download it now
May 17th, 2012 3:08am

CGI is installed. Along with all of the following: Static content Default Document Directory Browsing HTTP Errors HTTP Logging Logging Tools Request Monitor ODBC Logging Request Filtering Static Content Compression IIS Management Console IIS 6 Metabase Compatibility IIS 6 Management Console
May 17th, 2012 3:38am

If I could just find the logs... Then I can take a look at what is happening. Is PHP actually trying to send and failing because... it can't find the server? the server rejects the connection? Or does the mail protocol not initiate at all? I just wish I knew WHY it failed. Then I can get on with fixing the problem. Anyone have any ideas?
Free Windows Admin Tool Kit Click here and download it now
May 17th, 2012 7:30am

Hi, Thanks for posting in Windows Server forum. However, from your description, it appears that this is not a Windows Server related issue. For best practice, I would suggest that we post this issue at IIS forum. There you can get more effective suggestion by other experts who familiar with this topic. Your understanding is highly appreciated. IIS Forum http://forums.iis.net/ Best Regards, AidenAiden Cao TechNet Community Support
May 20th, 2012 10:10pm

Hi, Thanks for posting in Windows Server forum. However, from your description, it appears that this is not a Windows Server related issue. For best practice, I would suggest that we post this issue at IIS forum. There you can get more effective suggestion by other experts who familiar with this topic. Your understanding is highly appreciated. IIS Forum http://forums.iis.net/ Best Regards, AidenAiden Cao TechNet Community Support
Free Windows Admin Tool Kit Click here and download it now
May 20th, 2012 10:11pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics