Results 1 to 2 of 2

Thread: Simple e-mail form

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2002
    Location
    romania
    Posts
    8

    Simple e-mail form

    Hello! I want to make a e-mail form with a simple code. This code I want to use it into my personal web page. If there is anyone who can help me please put here a simple code. Please help me with this 'cause I am a beginner into ASP and I want to learn this.
    Selena

  2. #2
    Member
    Join Date
    Sep 2001
    Location
    Fishburn
    Posts
    45
    ASP.NET makes it easy to send e-mails from a web server. For example if you have an Apply button, and 3 textboxes the user fills in. On the button click event, you could have for example...


    Private Sub cmdApply_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdSearch.Click

    Dim NewMessage As New System.Web.Mail.MailMessage()
    NewMessage.To = txtTo.Text
    NewMessage.From = "[email protected]"
    NewMessage.Subject = txtSubject.Text
    NewMessage.Body = txtBody.Text
    System.Web.Mail.SmtpMail.Send(NewMessage)

    End Sub


    Of course there's no validation shown here, but its a starting point.

Posting Permissions

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



Click Here to Expand Forum to Full Width