Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mail funtion problem

Status
Not open for further replies.

shaggy56

Programmer
Mar 16, 2003
12
US
I have a page that mails information in a form to my Comcast email address, though I am not on the Comcast internet network. The code used to work up until last night. Now for some reason I get thing error

“Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 Relaying not allowed (Try authenticating):”

I am using windows 2000 with IIS and php version 4.3.1 Could this error be caused by Comcast blocking the SMTP server to my web server’s IP? I have no clue I am new to php and have tried to get this to work but I am all out of ideas.
 
This has nothing to do with PHP. It is a mail server permission problem.

However, here are some ideas:
1. Many ISPs do not allow unauthenticated mail delivery. You need to authenticate as someone who has an account with the ISP to succesfully send mail using the SMTP service.

2. It is possible that Comcast changed their policy, as most ISPs and hosts allow to send e-mail to the domain the server services.

3. it is also possible that you checked your mail from the same IP with a mail client that authenticated to the mail server. That means that your IP was known as authenticated and was succesively accepted until authentication expired.

Try to check your mail with the client, then probably the send will go through. It explains the behavior, but will not solve your problem.

I suggest you use a class, such as phpmailer, that allows you to authenticate to the mail server before sending.
Visit:

Unless you want to write your own authentication code (which is reinventing the wheel) above class is a great tool.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top