Re: How to send email in VB.NET 2005(From Windows Applications) Hi,
Use this code to send mail.
Dim myMessage As System.Web.Mail.MailMessage
Try
myMessage = New System.Web.Mail.MailMessage
With myMessage
.To = "abc@xyz.co.in"
.From = "abc@xyz.co.in"
.Subject = "Testing Mail "
.Body = "This is a testing mail without attachments"
.BodyFormat = System.Web.Mail.MailFormat.Html
End With
System.Web.Mail.SmtpMail.Send(myMessage)
Catch myexp As Exception
MsgBox(myexp.Message, MsgBoxStyle.Critical, Me.Text)
End Try
__________________ S.Balasubramanian Nothing is impossible |