Private Sub sendError()
Try
Dim HTML2 As String = "UserID: " & Session("UserName") & " has experienced an error.<br /> " & _
"Users Full Name: " & Session("fullName") & "<br />" & "Error Message: " & Session("ex")
Dim mess As New System.Net.Mail.MailMessage
Dim sc As New System.Net.Mail.SmtpClient
mess.To.Add(New System.Net.Mail.MailAddress("[email protected]"))
mess.CC.Add(New System.Net.Mail.MailAddress("[email protected]"))
mess.Subject = "Error Message"
mess.Body = HTML2
mess.From = New System.Net.Mail.MailAddress("[email protected]")
mess.IsBodyHtml = True
sc.Host = "mymaskedIPAddress"
sc.Send(mess)
Finally
End Try
End Sub
|