% sYouEmail="info@gtglobal.com" ' Email Subject EmailSubject="GtGlobal.com contact" 'Error Message Color ErrorColor="red" Function ValidateField(sFieldvalue, sFieldtype) ValidField = true Select Case LCase(sFieldtype) Case "name" If Len(sFieldvalue) = 0 Then ValidField = False Case "phone" If Len(sFieldvalue) = 0 Then ValidField = False Case "email" If Len(sFieldvalue) < 5 Then ValidField = False Else If InStr(1, sFieldvalue, "@", 1) < 2 Then ValidField = False Else If InStr(1, sFieldvalue, ".", 1) < 4 Then ValidField = False End If End If End If Case "stime" If Len(sFieldvalue) = 2 Then ValidField = False Case "else" ValidField = False End Select ValidateField = ValidField End Function Sub ShowForm %>
<% End Sub Sub Send sPunter = Request.Form("Name") sPunterEmail = Request.Form("Email") Phone = Request.Form("Phone") Company = Request.Form("company") Fax = Request.Form("fax") sTime = Request.Form("stime") If Request.Form("ampm") = "true" then sMailout = " AM" Else sMailout =" PM" End If Message = Request.Form("message") sMessage = "This is a message from " & sPunter & vbcrlf _ & vbcrlf _ & vbcrlf _ & "Message :" & Message & vbcrlf _ & vbcrlf _ & "Their Phone is: " & Phone & vbcrlf _ & vbcrlf _ & "Company: " & company & vbcrlf _ & vbcrlf _ & "Fax: " & fax & vbcrlf _ & vbcrlf _ & "Time: " & stime & sMailout & vbcrlf _ & vbcrlf _ & "Their email is: " & sPunterEmail & vbcrlf _ & vbcrlf _ & Mailout & vbcrlf _ & vbcrlf Set objNewMail = CreateObject("CDO.message") objNewMail.Send sPunterEmail, sYouEmail, EmailSubject, sMessage Set objNewMail = Nothing End Sub Set dictFields = Server.CreateObject("Scripting.Dictionary") For Each Field in Request.Form If ValidateField(Request.Form(Field), Field) = False Then dictFields.Add LCase(Field), true End If Next If Request.Form.Count <> 0 And dictFields.Count = 0 Then %>
Your message has been mailed!
Thank you for contacting us. A reply will be sent soon.
- "GtGlobal.com"
<% Call Send Else ShowForm End If %> <% '-- Send Email -- Set objMail = CreateObject("CDO.message") objMail.From = Request.Form("eMail") objMail.To = "email" 'objMail.To = Request.Form("eMail") objMail.Subject = "Subscribe (" & Date & ")" 'objMail.Importance = 1 objMail.TextBody = body result = objMail.send() Set objMail = nothing Set objConf = CreateObject("CDO.message") objConf.From = "info@gtglobal.com" objConf.To = Request.Form("email") objConf.Subject = "GtGlobal.com (" & Date & ")" objConf.Importance = 1 body = "Hello " & Request.Form("name") & "," & vbCrLf & vbCrLf & vbCrLf body = body & "Thank you for contacting us. We are looking forward to serve you. Our next available representative will contact you with in 24 hour." & vbCrLf & vbCrLf & vbCrLf & vbCrLf body = body & "GtGlobal.com" & vbCrLf body = body & "Your e-power management" & vbCrLf objConf.TextBody = body result2 = objConf.Send() Set objConf = nothing %>