Hello
When I debug my SMTP code, which is not sending a form, I get the following:
Troubleshooting Exceptions: System.Net.Mail .SmtpException
- The exception that is thrown when the SmtpClient is not able to send a Send
System.Net.Mail .SmtpException was caught
HResult=-2146233088
Message=Error in processing. The server response was: Greylisted, please try again in 180 seconds
Source=System
StackTrace:
at System.Net.Mail .RecipientComma nd.CheckRespons e(SmtpStatusCod e statusCode, String response)
at System.Net.Mail .SmtpTransport. SendMail(MailAd dress sender, MailAddressColl ection recipients, String deliveryNotify, Boolean allowUnicode, SmtpFailedRecip ientException& exception)
at System.Net.Mail .SmtpClient.Sen d(MailMessage message)
at Contact.SendEma il_Click(Object sender, EventArgs e) in C:\Users\Steve\ Documents\Visua l Studio 2013\VHS-DVD\Contact.asp x.vb:line 140
InnerException:
Line 140 is this:
But that doesn't tell me much, or how to correct it.
This is my SMTP code (stripped):
Where could the error be, please? This is the URL:
Thank you.
When I debug my SMTP code, which is not sending a form, I get the following:
Troubleshooting Exceptions: System.Net.Mail .SmtpException
- The exception that is thrown when the SmtpClient is not able to send a Send
System.Net.Mail .SmtpException was caught
HResult=-2146233088
Message=Error in processing. The server response was: Greylisted, please try again in 180 seconds
Source=System
StackTrace:
at System.Net.Mail .RecipientComma nd.CheckRespons e(SmtpStatusCod e statusCode, String response)
at System.Net.Mail .SmtpTransport. SendMail(MailAd dress sender, MailAddressColl ection recipients, String deliveryNotify, Boolean allowUnicode, SmtpFailedRecip ientException& exception)
at System.Net.Mail .SmtpClient.Sen d(MailMessage message)
at Contact.SendEma il_Click(Object sender, EventArgs e) in C:\Users\Steve\ Documents\Visua l Studio 2013\VHS-DVD\Contact.asp x.vb:line 140
InnerException:
Line 140 is this:
Code:
Smtpserver.Send(myMessage)
This is my SMTP code (stripped):
Code:
Protected Sub SendEmail_Click(sender As Object, e As System.EventArgs) Handles SendEmail.Click Dim myMessage As New MailMessage Dim Smtpserver As New SmtpClient Dim user_name As String = Request.Form("user_name") Dim user_email As String = Request.Form("user_email") Dim user_subject As String = Request.Form("user_subject") Dim user_message As String = Request.Form("user_message") myMessage.From = New MailAddress(user_email) 'User email myMessage.To.Add(New MailAddress("info@mysite.com")) 'Webmaster myMessage.CC.Add(New MailAddress("info1@mysite.com")) 'Webmaster's assistant myMessage.Subject = user_subject myMessage.Body = user_message Smtpserver.Host = ("IP_Add") Smtpserver.Port = 25 Dim basicAuthenticationInfo As New System.Net.NetworkCredential("info@mysite.com", "pwd") Smtpserver.Send(myMessage)
Thank you.
Comment