I use the following code to email from a form :
Sub sendEmail(Src As Object, E As EventArgs)
Dim msg as New MailMessage()
msg.To = "paul@dotnet.itags.org.mydomain.com"
msg.From = "fred@dotnet.itags.org.mydomain.com"
msg.Subject = "TESTING"
msg.BodyFormat = MailFormat.Html
msg.Body = "TESTING BODY"
SmtpMail.SmtpServer = "localhost"
SmtpMail.Send(msg)
msg = Nothing
end sub
But I keep getting the error message :
"The server rejected one or more recipient addresses. The server response was: 550 5.7.1 Unable to relay for paul@dotnet.itags.org.mydomain.com"
Can anyone tell me what Im doing wrong ?
P.S. I do have the appropriate Include at the top of my page:)
You are getting this error because in smtp server your relay list is empty.
Try this :
1. In IIS right-click on the Default SMTP Virtual Server and select Properties.
2. In the Properties dialog box, selec the Access tab.
3. Click on the Relay button.
4. In the Relay Restrictions dialog box, select the Allow except the list below radio button.
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment