I am working on VS 2005 website, I need to send an email so I tried the Insert “Code Snippet“ feature and it inserted: Dim email As New MailMessage() email.To = "RecipientAddress" email.From = "SenderAddress" email.Body = "MessageText" email.Subject = "SubjectText" email.BodyFormat = MailFormat.Text SmtpMail.SmtpServer = "SmtpServerName" SmtpMail.Send(email) but the designer gives you the following warning Warning 15 'System.Web.Mail.MailMessage' is obsolete: 'This class is deprecated. ......