SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Feb 2007
    Posts
    90
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    inquiry from+asp.net+email generated

    i have develop a web in aso.net now i want inquiry form that visiotrs can fill their details in this form n email will b generated details will come to me as email but below code there is a 1 problem in this code ui have to give my email id with password which i dont need i just want that simple email with detail generated n i will have detail form form how do i code this i donot want to pass my email id n password i will received only email with detail


    Imports System.Net.Mail

    Partial Class Inquiry
    Inherits System.Web.UI.Page

    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click

    Dim MESSAGE As New MailMessage
    Dim client As New SmtpClient("smtpout.asia.secureserver.net")
    client.Credentials = New System.Net.NetworkCredential("aaaaaa.net", "iaaaaa")

    client.Port = 25

    client.EnableSsl = False

    MESSAGE.From = New MailAddress("aaa@aa.net")
    MESSAGE.To.Add(New MailAddress("aa@aaa"))


    message.Subject = "abc"

    MESSAGE.Body = "abc"

    client.Send(MESSAGE)



    End Sub

    Protected Sub TextBox1_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged

    End Sub
    End Class

  2. #2
    SitePoint Mentor NightStalker-DNS's Avatar
    Join Date
    Jul 2004
    Location
    Cape Town, South Africa
    Posts
    2,873
    Mentioned
    44 Post(s)
    Tagged
    0 Thread(s)
    What is the problem with the above? That should be able to send with no problem. You can set the body to be html format and format you data with html in the body and send it to yourself.

    And just so that you know, the TextBox1_TextChanged event you have is not going to work, as it needs to postback. You need to use javascript if you want live textchanged function.

  3. #3
    SitePoint Enthusiast
    Join Date
    Feb 2007
    Posts
    90
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There is no prblem with this code the problem is that when user receive email ot shows my emaill address which is in message.from code i dont need that

  4. #4
    SitePoint Mentor NightStalker-DNS's Avatar
    Join Date
    Jul 2004
    Location
    Cape Town, South Africa
    Posts
    2,873
    Mentioned
    44 Post(s)
    Tagged
    0 Thread(s)
    I do not understand. An email has to come from a from address that exists. But you can change it to anything you like.


Bookmarks

Posting Permissions

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