Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > PHP How-To
PHP How-To Post your "How do I do this with PHP?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old January 22nd, 2005, 12:49 AM
Friend of Wrox
Join Date: Oct 2003
Posts: 479
Thanks: 0
Thanked 3 Times in 3 Posts
Send a message via MSN to surendran Send a message via Yahoo to surendran
Default Error in mail() from IIS/SMTP

i try to send a mail using php code

mail($recipient, $subject, $msg, $mailheaders);

but error is here,
please tell me a good solution.

Warning: mail(): SMTP server response: 550 5.7.1 Unable to relay for surendran@mail.com in c:\inetpub\wwwroot\newexclusive\tmps\email.php on line 6

(Anything is Possible)
(Anything is Possible)
Old January 22nd, 2005, 04:54 AM
Friend of Wrox
Join Date: Oct 2003
Posts: 463
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to madhukp

This is because of the typical mail relay problem.

I assume you are using SMTP server to send mails. You need to configure SMTP to solve this problem.

Open IIS manager.

Right click SMTP Server and open properties.

Open "access tab".

Towards the bottom of the fprm, there is a relay button. Click that.

There are two options 1) Only the list below. 2)All except the list below. Select the first.

Click add. In the window, give your domain and click OK.

The steps will slightly vary from OS to OS.
Old January 22nd, 2005, 08:24 AM
Authorized User
Join Date: Jan 2005
Posts: 82
Thanks: 0
Thanked 0 Times in 0 Posts

the 550 error is generated when there are no users on the other end, normally. Are you sure that email is a valid email address?

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail(SMTP) ajit Java Basics 2 October 24th, 2007 12:01 AM
SMTP Authentication and mail() lemonadeX Pro PHP 1 July 31st, 2007 10:06 AM
Send e-mail in smtp Samikaraeen Pro VB.NET 2002/2003 1 February 14th, 2005 12:01 PM
Configure SMTP in IIS abq23 Classic ASP Basics 1 May 17th, 2004 12:15 PM
SMTP for mail() petercch Pro PHP 1 July 25th, 2003 06:53 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.