ASP.NET contact form problem

yannhuet

New Member
Messages
5
Reaction score
0
Points
0
Hi there,

I would like some information about ASP.NET contact form. I created one of my web page, and i used VB.NET to write the script.

When i try to submit, i've got no errors, it seems to work, but i never receive the message in my mail box afterwards... I'm wondering why!

Here is my code in VB.NET:

Code:
Imports System.Net.Mail


Partial Class _Default
    Inherits System.Web.UI.Page


    Sub Submit(ByVal Source As Object, ByVal e As EventArgs)


        Dim mailMessage As New MailMessage()
     
        mailMessage.From = New MailAddress(txtMail.Text)
       
        mailMessage.To.Add("yannh@hotmail.com")
     
        mailMessage.Subject = txtSubject.Text
     
        mailMessage.IsBodyHtml = False
    
        mailMessage.Body = txtBody.Text
  
        mailMessage.Priority = MailPriority.Normal
     

        Dim smtp As New SmtpClient ("mail.yannhuet.co.cc")
        smtp.Host = "mail.yannhuet.co.cc"
        smtp.Send(mailMessage)
      
        lblResponse.Text = "Your email has been sent."
     

    End Sub

End Class

Please someone help me

Yann
 
Top