Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am running a windows server (windows 7) with IIS 7. ESMTP MailEnable is running on port 25. I am also running apache and php on the server. When I use php's mail() it returns false indicating that it can't connect to the outgoing SMTP server (at least I believe that's what it means). I can tell that MailEnable is running because when I run

>telnet localhost 25

the response is

220 WDC1358.home ESMTP MailEnable Service, Version: 5.10-- ready at 06/18/11 20:06:43

I am at a loss for why this is not working with php. Any help would be greatly appreciated.

share|improve this question
Have you checked the PHP error log as well as MailEnable SMTP log (MainEnable Administrator -> Servers -> localhost -> Connectors -> SMTP -> Logs -> Debug)? MailEnable log should tell the possible reason. – LazyOne Jun 18 '11 at 20:55
up vote 1 down vote accepted

I think you need to enable Mail Relay for local address.

Allow relay for privileged IP ranges. Allows people with certain IP addresses to send email through the server. If the IP addresses of persons who are able to send email out through the server is known, use this option. DO NOT select this option if the list of IP addresses is unknown, as this may inadvertently allow everyone access. This option is usually required to allow sending through the server from a web server or web page.

MainEnable Administrator -> Servers -> localhost -> Connectors -> SMTP -> Properties -> Relay -> Enable Mail Relay -> Allow relay for privileged IP ranges. Add your IP there (simple "" should work fine).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.