|
Announcements |
 |
 |
| |
Click here
to find out how these
successful retailers stay ahead of the competition with
Seaport's Retail Loyalty!
|
|
Demo Request |
| All fields must be completed. |
<%
Dim strTo, strFrom, strSubject, strBody, strRedirect, strFirstName, strLastName, strAddress
Dim strCity, strState, strZip, strComments, strPhone 'Strings for recipient, subject, boby
'PSMAIL.asp
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' -- CONFIGURATION SECTION --
'
' THIS IS THE DEFAULT RETURN FROM ADDRESS USED ONLY WHEN THE
' FORM DOES NOT SPECIFY ANOTHER FROM ADDRESS IN THE FORM'S 'FROM' FIELD.
FromAddress = "brandon@seaportsoftware.com"
' ALLOWEDHOSTS IS A COMMA SEPARATED LIST OF DOMAIN NAMES THAT ARE ALLOWED
' TO USE THIS FORM PROCESSOR. FOR EXAMPLE:
' www.mydomain.com, mydomain.com, www.mydomain.net, mydomain.net
AllowedHosts = "www.seaportsoftware.com,www.localhost.com"
' ALLOWEDREFERRERS IS A COMMA SEPARATED LIST OF URLS WHO ARE
' ALLOWED TO USE THIS FORM. THIS SHOULD BE THE COMPLETE URL LIKE
' http://myhost.com/support/feedback.htm, http://www.myhost.com/support/feedback.htm
' IT SHOULD INCLUDE ALL DOMAIN NAMES YOUR PAGE CAN BE ADDRESSED BY.
AllowedReferrers = "http://www.seaportsoftware/DemoRequest.asp,http://localhost/MyWeb/DemoRequest.asp,http://localhost/MyWeb/DemoRequest.html"
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' MAKE NO CHANGES BELOW THIS LINE
Allow = False
AllowedHosts = Replace(AllowedHosts, " ", "")
AllowedReferrers = Replace(AllowedReferrers, " ", "")
AllowedHosts = Replace(AllowedHosts, Chr(9), "")
AllowedReferrers = Replace(AllowedReferrers, Chr(9), "")
Hosts = Split(AllowedHosts, ",")
Referrers = Split(AllowedReferrers, ",")
strTo = "brandon@seaportsoftware.com"
'strFrom = Trim("brandon@seaportsoftware.com")
'strSubject = Trim("tom smith")
'strRedirect = Trim("DemoRequest.asp")
strFrom = Request.Form("email")
'strSubject = Trim(CStr(Request.Form("subject")))
'strRedirect = Trim(CStr(Request.Form("redirect")))
strSubject = "Demo Download "
'RebuildToString(Rcpt)
strFirstName = Trim(CStr(Request.Form("first")))
strLastName = Trim(CStr(Request.Form("last")))
strPhone = Trim(CStr(Request.Form("phone")))
strAddress = Trim(CStr(Request.Form("address")))
strCity = Trim(CStr(Request.Form("city")))
strState = Trim(CStr(Request.Form("state")))
strZip = Trim(CStr(Request.Form("zip")))
strComments = Trim(CStr(Request.Form("comments")))
Allow = true
if strFrom = "" then
%>
<%
else
strBody = "Demo Download: " & vbCRLF
strBody = strBody & "First Name: " & strFirstName & vbCRLF
strBody = strBody & "Last Name: " & strLastName & vbCRLF
strBody = strBody & "Phone: " & strPhone & vbCRLF
strBody = strBody & "Address: " & strAddress & vbCRLF
strBody = strBody & "City: " & strCity & vbCRLF
strBody = strBody & "State: " & strState & vbCRLF
strBody = strBody & "Zip: " & strZip & vbCRLF
strBody = strBody & strComments & vbCRLF
strBody = strBody & vbCRLF & vbCRLF
strBody = strBody & "date: " & Now
Set objMessage = Server.CreateObject("CDO.Message")
objMessage.Subject = strSubject
objMessage.Sender = strFrom
objMessage.To = strTo
objMessage.TextBody = strBody
objMessage.Send
Set objMessage = Nothing
Response.Write(" Message sent. ")
strFrom = ""
response.redirect("./DemoDownload.html")
end if
Function BaseHost(host)
Dim x, tempstring
If InStr(host, "://") <> 0 Then
host = Mid(host, InStr(host, "://")+3)
End If
host = strreverse(host)
tmpstring = host
x = Len(host)
for y = x to 1 step -1
if mid(host, y, 1) = "/" Then
tmpstring = mid(host, y+1)
exit for
end if
next
BaseHost = strreverse(tmpstring)
End Function
Function ValidateDomain(strRef)
dim x
ValidateDomain = false
for each x in Hosts
if x <> "" and Instr(1, strRef, x, 1) > 0 then
ValidateDomain = true
exit for
end if
next
End Function
Function IsEmail(sEmail)
Dim regEx, retVal
IsEmail = false
Set regEx = New RegExp
regEx.Pattern ="^[\w-\.]{1,}\@([\da-zA-Z-]{1,}\.){1,}[\da-zA-Z-]{2,3}$"
regEx.IgnoreCase = true
retVal = regEx.Test(sEmail)
If not retVal Then
exit function
End If
IsEmail = true
End Function
Function Allowed(ThisArray(), ThisString)
Allowed = False
for each x in ThisArray
if LCase(ThisString)= LCase(x)then
Allowed = True
exit for
end if
next
End Function
Sub RebuildToString(Rcpt())
Dim x
strTo = ""
for each x in Rcpt
if IsEmail(trim(x)) = True then
strTo = strTo & trim(x) & ", "
end if
next
x = Len(strTo)
if x > 0 then
strTo = Trim(strTo)
strTo = ChopChar(strTo, ",")
end if
End Sub
Function ChopChar(strString, strChar)
Dim x
x = Len(strString)
if mid(strString, x) = strChar then
ChopChar = mid(strString, 1, x -1)
else
ChopChar = strString
end if
End Function
%>
|
|
|
|
|
|
|