I was using the following code in order to send e-mails to my company's intranet accounts from a VB.NET 2003 aplication. However this code was marked as no longer valid when I migrated the application after installing Visual Studio 2005. Could you help me modifying this code in order for my application to compile succesfully?
Dim email As New System.Web.Mail.MailMessage
email.To = "some@Email"
email.From = "my_Application"
email.Subject = "BE CAREFULL! Errors encountered"
email.Body = "messagebody"
email.BodyFormat = Web.Mail.MailFormat.Text
System.Web.Mail.SmtpMail.SmtpServer = "###.###.###.###"
Try
System.Web.Mail.SmtpMail.Send(email)
Catch ehttp As System.Web.HttpException
Console.WriteLine(ehttp.InnerException.InnerException.Message)
End Try