%
Dim ResultHTML
Dim Form: Set Form = New ASPForm %>
<%
Server.ScriptTimeout = 1000
Form.SizeLimit = &H100000
Const fsCompletted = 0
If Form.State = fsCompletted Then 'Completted
ResultHTML = ProcessForm
ElseIf Form.State > 10 then
Const fsSizeLimit = &HD
Select case Form.State
case fsSizeLimit: ResultHTML = "
Source form size (" & Form.TotalBytes & "B) exceeds form limit (" & Form.SizeLimit & "B)
"
case else ResultHTML = "
Some form error.
"
end Select
End If
if request.QueryString("Action") = "Cancel" then
ResultHTML = "
Upload was cancelled"
end if
Function TempFolder()
Dim FS
Set FS = CreateObject("Scripting.FileSystemObject")
'Get temporary folder
TempFolder = FS.GetSpecialFolder(2) & "\emailtemp"
'TempFolder = Server.MapPath("\test") & "\emailtemp"
End Function
Sub DeleteFile(FileName)
Dim FS
Set FS = CreateObject("Scripting.FileSystemObject")
FS.DeleteFile FileName
End Sub
Function ProcessForm
Dim eFrom, eTo, Subject, Message
salutation=Form("salutation")
FirstName=Form("FirstName")
LastName=Form("LastName")
Email=Form("Email")
phone=Form("phone")
City=Form("City")
Company=Form("Company")
URL=Form("URL")
contact=Form("contact")
Inquiry_Software=Form("Inquiry_Software")
Inquiry_staff=Form("Inquiry_staff")
Inquiry_back=Form("Inquiry_back")
Inquiry_merger=Form("Inquiry_merger")
Inquiry_sta=Form("Inquiry_sta")
Inquiry_other=Form("Inquiry_other")
Inquiry_otherbox=Form("Inquiry_otherbox")
requirements=Form("requirements")
eFrom = Email
eTo = "dmanzer@thesagecloser.com"
Subject ="Enquiry from www.thesagecloser.com"
str="
| " str=str&" | |
Enquiry from theSageCloser.in | "
str=str&"|
Contact Details | "
str=str&"|
| Salutation | "&salutation&" | " str=str&"
| First Name | "&FirstName&" | " str=str&"
| Last Name | "&LastName&" | " str=str&"
| "&Email&" | |
| Telephone Number | "&phone&" | " str=str&"
| City | "&City&" |
| Company URL | "&URL&" |
| Company | "&Company&" |
| Preferred method of initial contact | "&contact&" | " str=str&"
Inquiry Details | "
str=str&"|
Which of these services do you require? | "
str=str&""&Inquiry_Software&" "&Inquiry_staff&" "&Inquiry_back&" "&Inquiry_merger&" "&Inquiry_sta&" "&Inquiry_other&" | "
str=str&"
| (Please Specify) | "&Inquiry_otherbox&" |
* Please describe your requirements | "&requirements&" | " str=str&"
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||