The server response was: 550 5.7.1 Unable to relay for

I keep getting this message from ASP.NET
The server response was: 550 5.7.1 Unable to relay for sender@domain.com.

in XP , I have Visual Studion installed in it, in SMTP Virtual server of XP I added the machine itself for a relay.
in Exchange server 2003 I added the XP machine name in a relay restriction also.

I have this code in asp.net:

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Dim msg As New MailMessage
        msg.From = "administrator@training.com"
        msg.To = "administrator@training.com"
        msg.Subject = " EMAIL TEST"
        SmtpMail.SmtpServer = "localhost"
        SmtpMail.Send(msg)
    End Sub
jskfanAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
moorhouselondonConnect With a Mentor Commented:
Try changing the msg.From parameter to a legitimate user in the Exchange Active Directory.
0
All Courses

From novice to tech pro — start learning today.