Thursday, March 29, 2012

SMTP error ...

Hi, I got my computer reformated and reinstalled IIS and web matrix. Now it's currently working ... but, I got error message when I try to send an email. It was working fine befroe I reformated my computer. HELP!!! :(

========================
Error below:

Server Error in '/Dating' Application.
------------------------

The server rejected one or more recipient addresses. The server response was: 550 5.7.1 Unable to relay for andy@dotnet.itags.org.hotmail.com
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.COMException: The server rejected one or more recipient addresses. The server response was: 550 5.7.1 Unable to relay for andy@dotnet.itags.org.hotmail.com

Source Error:

Line 32:
Line 33: SmtpMail.SmtpServer = "192.168.2.178"
Line 34: SmtpMail.Send(mail)
Line 35:
Line 36: response.redirect("send.aspx?receiver=" & receiverAddress())

Source File: c:\inetpub\wwwroot\dating\mail.aspx Line: 34

==========My mail.aspx==========================

Sub btn_Click(sender as Object, e as System.EventArgs)

Dim mail As New MailMessage

if (request.form("message") = "") then

errorMsg.text = "ERROR! You are trying to send an EMPTY Message! <br /> Please enter message. "

else

mail.From = senderAddress()
mail.To = receiverAddress()

mail.Subject = "Message send by " & cstr(session("login_id")) & " from LoveLink.com "
mail.Body = request.form("message").Replace(system.environment.newline, "<br>")

mail.BodyFormat = MailFormat.Html

SmtpMail.SmtpServer = "128.292.7.118"
SmtpMail.Send(mail)

response.redirect("send.aspx?receiver=" & receiverAddress())

end if

End Sub

Check out this FAQ:

What is a relay server?
http://www.systemwebmail.com/faq/1.4.aspx

0 comments:

Post a Comment