For Programmers: Free Programming Magazines  


Home > Archive > PHP Programming > February 2005 > mail()Relaying denied. Proper authentication required









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author mail()Relaying denied. Proper authentication required
Bob Bedford

2005-02-24, 3:56 pm

when sending an email from the mail() function I get this message:
mail(): SMTP server response: 550 5.7.1 <test@test.com>... Relaying denied.
Proper authentication required

I did set the php.ini values like this:
SMTP = mail.myserver.com ; for Win32 only
smtp_port = 25
sendmail_from= webmaster@myserver.com; for Win32 only

I am coding on a "localhost" machine and I believed that connecting to a
mail server like it's done above would work. what's wrong ? How to set
authentication for letting my server accept my mail ?

Bob


NC

2005-02-24, 3:56 pm

Bob Bedford wrote:
>
> when sending an email from the mail() function I get this message:
> mail(): SMTP server response: 550 5.7.1 <test@test.com>... Relaying

denied.
> Proper authentication required
>
> I did set the php.ini values like this:
> SMTP = mail.myserver.com ; for Win32 only
> smtp_port = 25
> sendmail_from= webmaster@myserver.com; for Win32 only
>
> I am coding on a "localhost" machine and I believed that connecting

to a
> mail server like it's done above would work. what's wrong ?


Most likely, your SMTP server requires authorization. Turn it off
or, better yet, forget the mail() function and incorporate phpMailer
into your application. This way, your application could be deployed
anywhere and work without eithrt local or remote SMTP server.

phpMailer can be found here:

http://phpmailer.sf.net/

Cheers,
NC

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2010 codecomments.com