I have this form, where people can fill out information and click submit, I get an email with their submission. But now it no longer works. I get this error:

There was a configuration error.
Error (2): mail() [function.mail]: SMTP server response: 550 5.7.1 Unable to relay for myemail@mydomain.com
file:foldername/filename-lib.php
line: 6821 


server: Microsoft-IIS/6.0

I would apprecaite any help.

    I'm not entirely certain of all definitions, so some info may not be 100% accurate, and please take this into account when reading (google things to become certain, or wait for answers from someone more knowledgeable).

    I believe relaying is passing emails from server local to non-local or non-local to local. Moreover, you most likely have to send email from an existing and known address.

    So, your SMTP server should be on the same network as the origin of the SMTP connection. Do note that it would be possible to SSH or telnet to the SMTP server, and from that server connect to the SMTP server at localhost:25 or :587.

    And the from address (or perhaps it's enough with a valid reply-to address) should exist and belong to the same domain as the SMTP server. That is, if the SMTP server is smtp.example.com, the sending address has to be some.existing.address@example.com.

    The specific rules that do apply may change depending on configuration and server though, so either go by trial and error or read docs and check the config.

      Thanks a lot for your response, that's kind of you. I actually was playing around and added the default SMTP server name: 127.0.0.1 and the default port: 25 and it worked just fine. Thanks a lot.

        Write a Reply...