<% dim cname,email,message cname = Request.Form("name") email = Request.Form("email") message= Request.Form("message") Dim Mail Dim objConfig Dim Fields Const cdoSendUsingMethod = _ "http://schemas.microsoft.com/cdo/configuration/sendusing" Const cdoSendUsingPort = 2 Const cdoSMTPServer = _ "http://schemas.microsoft.com/cdo/configuration/smtpserver" Const cdoSMTPServerPort = _ "http://schemas.microsoft.com/cdo/configuration/smtpserverport" Set objConfig = Server.CreateObject("CDO.Configuration") Set Fields = objConfig.Fields With Fields .Item(cdoSendUsingMethod) = cdoSendUsingPort .Item(cdoSMTPServer) = "mail.agecables.com.pk" .Item(cdoSMTPServerPort) = 25 .Update End With set Mail = server.CreateObject ("CDO.Message") Set Mail.Configuration = objConfig Mail.To="khioffice@agecables.com.pk" Mail.From=email Mail.Subject="Query from the website | A.G.E Cables" Mail.HtmlBody="Name: " & cname & "
Email: " & email & "
Message: " & message On error resume next Mail.Send Set Mail=nothing if Err.Description<>"" then Response.Write(Err.Description) else Response.Redirect("success.html") end if %>