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!

sending mail from a php script

Status
Not open for further replies.

kzn

MIS
Jan 28, 2005
209
GB
Hi I am new to Php

This is the error I am getting when trying to send an email from my script:
Warning: mail(): SMTP server response: 554 <mervgh@yahoo.com>: Relay access denied in c:\program files\apache group\apache\htdocs\fourandfive\chap8\register.php on line 63



These are the lines of code I have in my script at the top of the page:
ini_set ("SMTP","mail.MyWebSite.com");
ini_set ("sendmail_from","webmaster@MyWebSite.com");

Correct me if I am wrong, It is better to use these lines of code instead of using the php.ini file if the server is shared. This error seems to look like I need authentication to relay the mail, how do I do this, or get around this?

Thanks in advance for your help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top