[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

PHP mail "unable to relay" error

Posted on 2010-09-20
4
Medium Priority
?
728 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses
Course of the Month12 days, 16 hours left to enroll

650 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