On Tue, Sep 15, 2009 at 11:14 AM, Aaron Throckmorton
<[email protected]> wrote:
>> It appears that the code runs perfectly, but the I get thie following
>> message back, which I'm assuming originates at the SMTP server...
>>
>> PHP Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 Unable
>> to relay in C:\Inetpub\wwwroot\email_test.php on line 6
>>
>>
> I have run into this issue before as well.  It does have to do with Windows
> SMTP not being configured as an open relay by default (thank goodness).
> there is a setting in IIS to configure which hosts are allowed to send mail
> through the SMTP server.  You have to add the IP address of the web server
> to that list.

Yes, exactly as Aaron pointed out, your problem is not in your PHP
setup, or the script itself.  The problem is your SMTP server does not
allow you to relay mail.

If you already have a mail server, you should use that instead of the
IIS SMTP server if possible.  If not possible, then follow Aaron's
tips for configuring it properly.

Also, there is nothing wrong with using the PHP built-in mail()
function.  It works great when configured correctly.  Unless you are
looking for other features (eg. MIME) there is no need to replace a
fast, small built-in function with a larger, slower, wheel
re-inventing, extraneous library.

Most people that do have problems with the mail() function simply have
it misconfigured.  Either pointing it to an SMTP server that is
misconfigured, or using the sendmail mechanism without having the
local MTA setup.  So instead of doing the right thing and using a real
MTA, they give up and use some fancy named bulky library.  The sad
part is, they actually put forth the effort to configure the library
correctly, but now have all this added bulk, and a dependency to boot.
 Erg!

--lonnie

_______________________________________________

UPHPU mailing list
[email protected]
http://uphpu.org/mailman/listinfo/uphpu
IRC: #uphpu on irc.freenode.net

Reply via email to