?
Solved

PHP mail "unable to relay" error

Posted on 2010-09-20
4
Medium Priority
?
721 Views
Last Modified: 2012-05-10
Hi there. I'm building email functionality on a PHP contact form processor. It sends to and from a set email address on the same domain as the server. I have tested this successfully on my own development server, but when the code is tested on the client's web site, I get the following error message:

"Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 Unable to relay for username@domain.com in C:\Program Files (x86)\EasyPHP-5.3.3\www\contact\feedback.php on line 221"

Note: i removed the email address and put 'username@domain.com' in its place. Online, I'm using a valid email address.

I don't have access to the client's web server. He deploys the code himself. Are there any instructions I could briefly point my client to in order for him to properly configure his mail server?

Thanks!
0
Comment
Question by:thtate
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 4

Accepted Solution

by:
rstjean earned 1000 total points
ID: 33721164
the odds are that the client's mail server doesn't allow the website to relay email.  You can get the ISP to put in a rule to relay, or if the hosting machine is a windows server then you will need to configure IIS as follows.

1) Go to: start > settings > control panel > Administrative Tools > Internet Information Services
2) Expand the " (local computer)" node
3) Right click on your SMTP server > go to "Properties"
4) Click "Access" tab
5) Under Relay Restrictions, click the "Relay" button
6) Click "Add"
7) Select "Single Computer" and enter IP address 127.0.0.1
8) Hit OK, OK, OK (until the properties dialog is closed)
0
 
LVL 84

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 1000 total points
ID: 33721199
Can he send email on that server with the email address you're using?  Did you try adding the "-f" fourth parameter in the mail() statement?  That's a Windows error statement.  What SMTP server did he install?
0
 

Author Comment

by:thtate
ID: 33725001
Turns out that the client needed to change some settings in his PHP.INI file.

Now the relay error is no more.

Thank you both for the help!
0
 

Author Closing Comment

by:thtate
ID: 33859806
Thanks!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question