imports System.Web.Mail
In the Click event of the button, write the following code.
Dim mailMsg as New MailMessage()
mailMsg .To = "abcdef@pqr.com"
mailMsg .Cc = "xyz@lmn.com"
mailMsg .From = "rst@def.com"
mailMsg .Subject = txtSubject.text
mailMsg.Body = txtBody.text
SmtpMail.Send(mailMsg)
Email messages can be either plain text or HTML.
Default is "plain text".
The BodyFormat property could be set as Html to send the mail in HTML format.
mailMsg.BodyFormat = MailFormat.Html
-----------------------------------------------------------------------
Note:
Classes used
SMTPMail and MailMessage
Please check whether your Microsoft SMTP Service is turned on
before you create applications to send mails
else the mails would never be sent.
Goto
Internet Information Services -> Default SMTP Virtual Server
Check if the 'play' button is disabled, if yes,it is already started
else start it.