<% dim fname,lname fname=Request.Form("fname") compname=Request.Form("compname") 'lname=Request.Form("lname") email=Request.Form("email") phone=Request.Form("dphone") subject=Request.Form("dsubject") other_info=Request.Form("dmessage") message = "
Contact Information
" & vbcrlf & vbcrlf message = message & "
First Name ..............: " & fname & vbcrlf message = message & "
Last Name ...............: " & lname & vbcrlf message = message & "
Email....................: " & email & vbcrlf message = message & "
Company Name.............: " & compname & vbcrlf message = message & "
Contact Number...........: " & phone & vbcrlf message = message & "
Service..................: " & subject & vbcrl message = message & "
Message..................: " & other_info & vbcrlf SendMail email, "Nicholas@f10s.com", "Contact Information recieved from Form10 Strategies Inc", message Response.Redirect("thankyou.html") %> <% Function SendMail(sfrom, sto, subject, strMessage) Trim(sFrom) Trim(sto) If Len(sFrom) < 1 Then ReportError strError & "
No Reply-to address (sFrom) for this letter" End If If Len(sto) < 1 Then ReportError strError & "
No recipient for this letter" End If IsValid sto IsValid sFrom Dim oConfig Set oMail = Server.CreateObject("CDO.Message") oMail.From = sfrom oMail.To = sto oMail.Subject = subject oMail.HtmlBody = strMessage oMail.Send Set oMail = Nothing Set oConfig = Nothing End Function Function IsValid(Email) Dim Temp,Temp2 strNotValid = "
Email address not valid" strTooLong = "
Email address too long" If Len(Email) > 100 Then ReportError strTooLong End If Email = LCase(Email) Temp = Split(Email,"@",2,1) If UBound(Temp) < 1 Then ReportError strNotValid End If Temp2 = Split(Temp(1),".",-1,1) If UBound(Temp2) < 1 Then ReportError strNotValid End If IsValid = true End Function sub ReportError(strmess) response.write("
") response.write strmess response.write("
") response.end end sub %>