Hi folks!

I'm new to PHP, and have been trying to get mail() to work on my server. I've configured the php.ini file to include the smtp server name. The PHP runs on a Windows NT server. This is the error I get :

Warning: mail() [function.mail]: SMTP server response: 554 Relay rejected for policy reasons. in c:\inetpub\wwwroot\new\mailtest.php on line 3

I know there is probably an extremely simple solution to this. Does anybody have a clue?

Your help is MUCH APPRECIATED!

Regards,

kyrie26

    Hi,

    the rejects to accept your mail for delivery because the server you're sending from (your web server) is not in a domain that is in the list of domains acceptable for relaying on the mail server.

    If you send mail to receipients managed by that server it would work. But if you try to use that server to send mail to receipients outside of the domain of that server or the domains configured on that server it will reject to send the mail.

    Example:

    Your webserver is www.domain1.com
    The Mailserver is mail.domain2.com
    The Mail server allows relaying for

    Domain2.com, Domain3.com and Domain4.com and you try to send a mail to user@domain5.com the mail server would refuse to do that. If your web server was e.g. www.domain2.com you would be able to send mail to other domains.

      Thanks! Problem solved.

      I appreciate your help! Thanks for taking the time to reply.

      Thread closed...

      Have a great day/week,

      kyrie26

        Write a Reply...