Imports System.Web.Mail Partial Class ServicesI Inherits System.Web.UI.Page Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Dim objEmail As New MailMessage objEmail.To = "amjadikram@alsaraf.com.kw" 'Hidden1.Value objEmail.From = TextBox4.Text objEmail.Subject = "Services Enquiry" Dim bd As String bd = "" bd = bd & "" bd = bd & "
" bd = bd & "Services Enquiry
" bd = bd & "
Customer Info
" bd = bd & "
First Name" bd = bd & TextBox1.Text & "Last Name" & TextBox2.Text & "
Company Name" bd = bd & TextBox3.Text & "Email" & TextBox4.Text & "
" bd = bd & "Telephone" & TextBox5.Text & "Fax" & TextBox6.Text & "
" bd = bd & "Address
Address-Area" bd = bd & TextBox7.Text & "Block" & TextBox8.Text & "
Street" & TextBox9.Text & "Building #" & TextBox10.Text & "
" bd = bd & "Floor" & TextBox11.Text & "Flat #" & TextBox12.Text & "
" bd = bd & "Product Info
" bd = bd & "Model" & TextBox13.Text & "Operating System" & OSName.Value & "
Serial Number" & TextBox14.Text & "Purchase Date" & purmonth.Value & " " & purday.Value & " " & puryear.Value & "
" bd = bd & "*Describe your problem/question:
" & TextBox15.Text & "
" bd = bd & "
" bd &= "" objEmail.Body = bd objEmail.BodyEncoding = System.Text.Encoding.GetEncoding("windows-1256") objEmail.BodyFormat = MailFormat.Html objEmail.Fields("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 objEmail.Fields("http://schemas.microsoft.com/cdo/configuration/sendusername") = "webmaster@q8rental.COM" objEmail.Fields("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "webmaster" SmtpMail.SmtpServer = "mail.q8rental.COM" Try SmtpMail.Send(objEmail) MSG1.Text = "Thank you! Your enquiry has been sent to services center. We'll send you a response shortly." Catch exc As Exception MSG1.Text = "check by phone" & exc.Message End Try End Sub Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim CODE1 As New SuperClass Dim found As Boolean = False If Not Page.IsPostBack Then CODE1.select_Email(1, Hidden1.Value, found) End If End Sub End Class