I'm having problems with my code. Can somone take a look and tell me what I've left out?
Thanks!
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim objEmail As New System.Net.Mail.MailMessage()
objEmail = Server.CreateObject("CDO.Message")
objEmail.To = "nc297@yahoo.com"
objEmail.From = "nc297@yahoo.com"
objEmail.CC = "nc297@yahoo.com"
objEmail.Subject = "EDCS Question"
objEmail.Body = "Your quesiton" & ", " & "your comments"
objEmail.Priority = "MailPriority.High"
Try
SmtpMail.Send(objEmail)
Response.Write("Email was sent")
Catch exc As Exception
Response.Write("Send failure: " + exc.ToString())
End Try
End Sub
End Class
Thanks!
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim objEmail As New System.Net.Mail.MailMessage()
objEmail = Server.CreateObject("CDO.Message")
objEmail.To = "nc297@yahoo.com"
objEmail.From = "nc297@yahoo.com"
objEmail.CC = "nc297@yahoo.com"
objEmail.Subject = "EDCS Question"
objEmail.Body = "Your quesiton" & ", " & "your comments"
objEmail.Priority = "MailPriority.High"
Try
SmtpMail.Send(objEmail)
Response.Write("Email was sent")
Catch exc As Exception
Response.Write("Send failure: " + exc.ToString())
End Try
End Sub
End Class