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've installed PHP 5.2 with Web PI on Windows Server 2008. This server also houses the Exchange server that I use for mail.

The script I'm using uses PHP's mail() function to send mail.

When using the function, mail is delivered when the recipient is within the domain, however if recipient is outside, it fails to deliver and mail returns an error.

I can't seem to find anything in the log files, so I am assuming it is an Exchange 2010 error.

share|improve this question
up vote 0 down vote accepted

Does your PHP script give you an error? I would imagine you're being denied relay access, but that's purely a guess.

You can verify if you're being denied relay pretty quickly by sending a mail using telnet. The place you're going to be told you're denied relay access is after the RCPT TO command.

If you are being denied relay, you will need to grant this (unfortunately I've not played with Exchange 2010, but I imagine it's similar to previous versions where you can authorise an IP address).

share|improve this answer
I'm getting 550 5.7.1 Unable to relay. Trying to resolve. – bear Mar 1 '10 at 19:07
Ok, now I've got it as an Open Relay which is a problem. – bear Mar 1 '10 at 19:22
Like I said I've not played with Exchange 2010, but a quick Google gets me… - does that help you at all? – Ben Pilbrow Mar 1 '10 at 19:27
It certainly does - just got to figure out why the email goes to the spam folder. – bear Mar 1 '10 at 19:53

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.