|

<% Function IIf( expr, truepart, falsepart )
IIf = falsepart
If expr Then IIf = truepart
End Function
Dim BR, P
BR = " "
P = BR & BR
If Request.ServerVariables("CONTENT_LENGTH") <> 0 AND Trim( Request.Form( "action" ) ) = "process" Then
'Declare variables
Dim i
Dim objMail
Set objMail = Server.CreateObject("CDO.Message")
' Define who the message is from
' The formatting of this string must comply with RFC 2822. Some examples are:
' user@example.com
' user@example.com, anotheruser@example.com
' User
' User , Another User
'this may be causing problems
'objMail.MailFrom = Trim( Request.Form( "txtName" ) ) & " <" & Trim( Request.Form( "txtEmail" ) ) & ">"
objMail.From = Trim( Request.Form( "txtEmail" ) )
'Define who the message is to
'objMail.To = "syoung@cambridgesuiteshotel.com"
'objMail.CC = ""
'objMail.BCC = "" '"robb@verbinteractive.com"
objMail.To = "rfp-mt-css@cambridgesuiteshotel.com"
objMail.CC = ""
objMail.BCC = "cent.css@gmail.com"
'Define the message subject
objMail.Subject = "Request for Proposal from " & Request.Form( "txtFirstName" ) & " " & Request.Form( "txtLastName" ) & " CSS-RFPM"
If Trim(Request.Form("pid")) <> "" Then
objMail.Subject = Request.Form("pid") & " - " & objMail.Subject
End If
'Define the Message body
objMail.HTMLBody = "" & BR & _
"MEETING OR EVENT TYPE " & BR
If Trim( Request.Form( "rdoMeetingEventType" ) ) <> "" Then
If Trim( Request.Form( "rdoMeetingEventType" ) ) = "Other" Then
objMail.HTMLBody = objMail.HTMLBody & Request.Form( "txtMeetingEventOther" ) & BR
Else
objMail.HTMLBody = objMail.HTMLBody & Request.Form( "rdoMeetingEventType" ) & BR
End If
End If
Dim strFirstDate, strLastDate
strFirstDate = MonthName( Request.Form( "FirstDate_Month" ) - (-1) ) & " " & Request.Form( "FirstDate_Day" ) & ", " & Request.Form( "FirstDate_Year" )
strLastDate = MonthName( Request.Form( "LastDate_Month" ) - (-1) ) & " " & Request.Form( "LastDate_Day" ) & ", " & Request.Form( "LastDate_Year" )
objMail.HTMLBody = objMail.HTMLBody & P & "FACILITIES & DATES" & BR
If Trim(Request.Form( "rdoFacility" )) <> "" Then objMail.HTMLBody = objMail.HTMLBody & Request.Form( "rdoFacility" ) & BR
objMail.HTMLBody = objMail.HTMLBody & _
"First Date of Event: " & strFirstDate & " " & Request.Form( "txtFirstTime" ) & Request.Form( "drpFirstTime" ) & BR & _
"Last Date of Event: " & strLastDate & " " & Request.Form( "txtLastTime" ) & Request.Form( "drpLastTime" ) & BR
If Trim( Request.Form( "txtExpectedPersons" ) ) <> "" Then objMail.HTMLBody = objMail.HTMLBody & "Expected # of Persons: " & Request.Form( "txtExpectedPersons" ) & BR
If Trim( Request.Form( "rdoFlexibleDates" ) ) <> "" Then objMail.HTMLBody = objMail.HTMLBody & "Are your dates flexible?: " & Request.Form( "rdoFlexibleDates" ) & BR
If Trim( Request.Form( "rdoFlexibleDates" ) ) = "Yes" Then objMail.HTMLBody = objMail.HTMLBody & "How flexible?: " & Request.Form( "txtHowFlexible" ) & BR
objMail.HTMLBody = objMail.HTMLBody & BR & "SETUP STYLE" & BR
If Trim( Request.Form( "rdoSetupStyle" ) ) <> "" Then
If Trim( Request.Form( "rdoSetupStyle" ) ) = "Other" Then
objMail.HTMLBody = objMail.HTMLBody & Request.Form( "txtSetupStyleOther" ) & BR
Else
objMail.HTMLBody = objMail.HTMLBody & Request.Form( "rdoSetupStyle" ) & BR
End If
End If
If Trim( Request.Form( "txtBreakOutSpace" ) ) <> "" Then objMail.HTMLBody = objMail.HTMLBody & "What break-out space does your event require? " & Request.Form( "txtBreakOutSpace" ) & BR
strHTML = strHTML & BR & "FOOD & BEVERAGE" & BR
If Trim( Request.Form( "chkFoodBeverageServices" ) ) <> "" Then objMail.HTMLBody = objMail.HTMLBody & "What food and beverage services does your group require? " & Request.Form( "chkFoodBeverageServices" ) & " " & Request.Form( "txtGroupServicesOther" ) & BR
strFirstDate = MonthName( Request.Form( "MajorityArrivalDate_Month" ) - (-1) ) & " " & Request.Form( "MajorityArrivalDate_Day" ) & ", " & Request.Form( "MajorityArrivalDate_Year" )
strLastDate = MonthName( Request.Form( "MajorityDepartureDate_Month" ) - (-1) ) & " " & Request.Form( "MajorityDepartureDate_Day" ) & ", " & Request.Form( "MajorityDepartureDate_Year" )
If Trim(Request.Form( "rdoFacility" )) <> "Function Space Only" Then
objMail.HTMLBody = objMail.HTMLBody & BR & _
"ACCOMMODATIONS" & BR & _
"Majority Arrival Date: " & strFirstDate & BR & _
"Majority Departure Date: " & strLastDate & BR
If Trim( Request.Form( "txtNumberGuestRooms" ) ) <> "" Then objMail.HTMLBody = objMail.HTMLBody & "Number of Guestrooms: " & Request.Form( "txtNumberGuestRooms" ) & BR
If Trim( Request.Form( "txt2Beds" ) ) <> "" Then objMail.HTMLBody = objMail.HTMLBody & "How many or what percentage of those guestrooms must have 2 beds?: " & Request.Form( "txt2Beds" ) & Request.Form( "drp2BedsPercent" ) & BR
If Trim( Request.Form( "chkParticipantsOriginateFrom" ) ) <> "" Then objMail.HTMLBody = objMail.HTMLBody & "Participants will originate from: " & Request.Form( "chkParticipantsOriginateFrom" ) & BR
End If
objMail.HTMLBody = objMail.HTMLBody & BR & _
"AUDIO/VISUAL REQUIREMENTS" & BR
If Trim( Request.Form( "txtAudioVisual" ) ) <> "" Then objMail.HTMLBody = objMail.HTMLBody & "What audio-visual equipment or technology will your event require? " & Request.Form( "txtAudioVisual" ) & BR
objMail.HTMLBody = objMail.HTMLBody & BR & _
"CONTACT INFORMATION" & BR
If Trim( Request.Form( "txtCompany" ) ) <> "" Then objMail.HTMLBody = objMail.HTMLBody & "Company: " & Request.Form( "txtCompany" ) & BR
If Trim( Request.Form( "txtLastName" ) ) <> "" Then objMail.HTMLBody = objMail.HTMLBody & "Name: " & Request.Form( "txtFirstName" ) & " " & Request.Form( "txtLastName" ) & BR
If Trim( Request.Form( "txtTelephone" ) ) <> "" Then objMail.HTMLBody = objMail.HTMLBody & "Telephone: " & Request.Form( "txtTelephone" ) & BR
If Trim( Request.Form( "txtFax" ) ) <> "" Then objMail.HTMLBody = objMail.HTMLBody & "Fax: " & Request.Form( "txtFax" ) & BR
If Trim( Request.Form( "txtEmail" ) ) <> "" Then objMail.HTMLBody = objMail.HTMLBody & "Email: " & Request.Form( "txtEmail" ) & BR
If Trim( Request.Form( "txtAddress" ) ) <> "" Then objMail.HTMLBody = objMail.HTMLBody & "Address: " & Request.Form( "txtAddress" ) & BR
If Trim( Request.Form( "txtCity" ) ) <> "" Then objMail.HTMLBody = objMail.HTMLBody & "City: " & Request.Form( "txtCity" ) & BR
If Trim( Request.Form( "drpProvince" ) ) <> "" Then objMail.HTMLBody = objMail.HTMLBody & "Province: " & Request.Form( "drpProvince" ) & BR
If Trim( Request.Form( "txtPostalCode" ) ) <> "" Then objMail.HTMLBody = objMail.HTMLBody & "Postal/Zip Code: " & Request.Form( "txtPostalCode" ) & BR
If Trim( Request.Form( "txtCountry" ) ) <> "" Then objMail.HTMLBody = objMail.HTMLBody & "Country: " & Request.Form( "txtCountry" ) & BR
objMail.HTMLBody = objMail.HTMLBody & BR
If Trim( Request.Form( "txtAdditionalRequests" ) ) <> "" Then objMail.HTMLBody = objMail.HTMLBody & "What else do we need to know about your event?: " & Request.Form( "txtAdditionalRequests" ) & BR
'Send the mail
Err.Clear
objMail.Send
' *********************************************************************************
' Send a copy of the message to the person who filled out the form...
'Define who the message is to
objMail.To = Request.Form( "txtFirstName" ) & " " & Request.Form( "txtLastName" ) & " <" & Trim( Request.Form( "txtEmail" ) ) & ">"
If Trim( objMail.To ) <> "" AND Err = 0 Then
' Define the message subject
'objMail.Subject = "Request For Proposal"
objMail.Subject = "Thanks for inquiring at Cambridge Suites Sydney CSS-RFPM"
' Define the Message body
objMail.HTMLBody = "Thank you for submitting your inquiry to Cambridge Suites Sydney. For your records, here is a copy of your inquiry. Should you need them, our email addresses and telephone numbers are available at http://cambridgesuitessydney.com/contactus.asp. You will hear from us soon. Thanks for your interest." & P & _
objMail.HTMLBody
Err.Clear
'Send the mail
objMail.Send
End If
If Err = 0 Then
Response.Redirect Request.ServerVariables("SCRIPT_NAME") & "?Sent=1"
Else
Response.Redirect Request.ServerVariables("SCRIPT_NAME") & "?Sent=0"
End If
ElseIf Trim( Request.QueryString( "Sent" ) ) = "1" Then
%>
Thank you for submitting your inquiry to Cambridge Suites Sydney.
For your records, a copy of your inquiry has been sent to the email address you provided. Should you need them, email addresses and telephone numbers for each member of our sales team are available at http://cambridgesuitessydney.com/contactus.asp.
You will hear back from us very soon. Thanks for your interest.
<%
ElseIf Request.ServerVariables("CONTENT_LENGTH") <> 0 AND Trim( Request.Form( "action" ) ) = "" Then
%>
<% Else
%>
Check space for your meeting or event by giving us a few details below.
Sharon Young, Meetings Services Coordinator, is also happy to hear from you by phone at (902)-563-7003 or 1-800-565-9466 or by email at syoung@cambridgesuiteshotel.com
<% End If
%>
|