B
Bgreer5050
I keep getting the following error on an asp form I have on my site. I know
the smtp settings are correct, because if I take out the user fields (i.e.
name, weight and assign a text string in code the email is processed.
Protected Sub SendEmail_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles SendEmail.Click
Const ToAddress As String = (e-mail address removed)
Dim mm As New Net.Mail.MailMessage([email protected], ToAddress)
mm.Subject = "Parts Request"
mm.Body = "Body" -----------------If I use mm.body = name.text I get the
timeout error
mm.Body = "weight"
mm.IsBodyHtml = False
Dim smtp As New Net.Mail.SmtpClient
smtp.Send(mm)
End Sub
Is it possible that it takes longer to process text boxes, therefore some
code needs to be added to prevent the timeout? If so, can someone help me
with the code snippet?
Here is the Error:
Service not available, closing transmission channel. The server response
was: Command timeout, closing transmission channel
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.Net.Mail.SmtpException: Service not available,
closing transmission channel. The server response was: Command timeout,
closing transmission channel
Source Error:
Line 20:
Line 21: '(4) Send the MailMessage (will use the Web.config
settings)
Line 22: smtp.Send(mm)
Line 23: End Sub
Line 24:
the smtp settings are correct, because if I take out the user fields (i.e.
name, weight and assign a text string in code the email is processed.
Protected Sub SendEmail_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles SendEmail.Click
Const ToAddress As String = (e-mail address removed)
Dim mm As New Net.Mail.MailMessage([email protected], ToAddress)
mm.Subject = "Parts Request"
mm.Body = "Body" -----------------If I use mm.body = name.text I get the
timeout error
mm.Body = "weight"
mm.IsBodyHtml = False
Dim smtp As New Net.Mail.SmtpClient
smtp.Send(mm)
End Sub
Is it possible that it takes longer to process text boxes, therefore some
code needs to be added to prevent the timeout? If so, can someone help me
with the code snippet?
Here is the Error:
Service not available, closing transmission channel. The server response
was: Command timeout, closing transmission channel
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.Net.Mail.SmtpException: Service not available,
closing transmission channel. The server response was: Command timeout,
closing transmission channel
Source Error:
Line 20:
Line 21: '(4) Send the MailMessage (will use the Web.config
settings)
Line 22: smtp.Send(mm)
Line 23: End Sub
Line 24: