Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2005

    Question Unanswered: can any body do this ??

    Hi All,

    I want to create a simple .net page which has 2 text boxes one 4 subject n other 4 message

    and a send button

    when we click to send button this message should be send to my particular mail id.

    can any body tell me which classes and objects will be used in it’s code’……..

    Thanx in advance


  2. #2
    Join Date
    Feb 2006
    imports System.Web.Mail

    In the Click event of the button, write the following code.

    Dim mailMsg as New MailMessage()

    mailMsg .To = ""
    mailMsg .Cc = ""
    mailMsg .From = ""
    mailMsg .Subject = txtSubject.text
    mailMsg.Body = txtBody.text


    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
    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.

    Internet Information Services -> Default SMTP Virtual Server
    Check if the 'play' button is disabled, if yes,it is already started
    else start it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts