% ON ERROR RESUME NEXT dim strFeedBack 'if the contact us form has been submitted then... If Request.Form <> "" Then 'email variables dim objMailer dim strSubject dim strBody dim strRecipientEmail 'Company Request For Information Form variables: dim strtCompany dim strWebSite dim strEmail dim strName dim strTitle dim strAddress1 dim strtAddress2 dim strCity dim strStateProv dim strPostZipCode dim strPhoneAreaCode dim strPhoneNumber dim strFaxAreaCode dim strFaxNumber dim strBusinessDescription dim strBusinessDescriptionOther strCompany = Request.Form("Company") strWebSite = Request.Form("WebSite") strEmail = Request.Form("Email") strName = Request.Form("Name") strTitle = Request.Form("Title") strAddress1 = Request.Form("Address1") strtAddress2 = Request.Form("Address2") strCity = Request.Form("City") strStateProv = Request.Form("StateProv") strPostZipCode = Request.Form("PostZipCode") strPhoneAreaCode = Request.Form("PhoneAreaCode") strPhoneNumber = Request.Form("PhoneNumber") strFaxAreaCode = Request.Form("FaxAreaCode") strFaxNumber = Request.Form("FaxNumber") strBusinessDescription = Request.Form("BusinessDescription") strBusinessDescriptionOther = Request.Form("BusinessDescriptionOther") 'set the email address of the person that is to receive the contact us emails strRecipientEmail = "info@vitesse.ca" 'strRecipientEmail = "shaun@greenbutton.ca" 'set the subject attribute of the Mailer object strSubject = "Company Request For Information - " & strName 'get user info strBody = strBody & strName & " (" & strEmail & ")" & vbCRLF strBody = strBody & strTitle & vbCRLF strBody = strBody & strCompany & vbCRLF strBody = strBody & strWebSite & vbCRLF & vbCRLF strBody = strBody & strAddress1 & vbCRLF if strAddress2 <> "" Then strBody = strBody & strAddress2 & vbCRLF strBody = strBody & strCity & ", " & strStateProv & vbCRLF strBody = strBody & strPostZipCode & vbCRLF strBody = strBody & "Phone: (" & strPhoneAreaCode & ") " & strPhoneNumber & vbCRLF If strFaxNumber <> "" Then strBody = strBody & "Fax: (" & strFaxAreaCode & ") " & strFaxNumber & vbCRLF & vbCRLF End If strBody = strBody & "Business Description:" & vbCRLF If strBusinessDescription <> "" Then strBody = strBody & strBusinessDescription & vbCRLF Else strBody = strBody & strBusinessDescriptionOther & vbCRLF End If 'begin: using the CDONTS mail object to accomodate Magma's server component limitations Set objMail = server.CreateObject("CDONTS.NewMail") objMail.BodyFormat = 1 'plain text objMail.MailFormat = 0 objMail.From = strEmail objMail.To = strRecipientEmail 'set the subject attribute of the Mailer object objMail.subject = strSubject 'set the body attribute of the Mailer object objMail.Body = strBody objMail.Send 'if an error occured while sending the email then... If err.number <> 0 Then 'set the strFeedBack variable with a message to let the user know that the sending of the email failed strFeedBack = "*** An error occured while sending your information to Vitesse, please try again later. ***" 'if the email was sent successfully then... Else 'set the strFeedBack variable with a message to let the user know that the sending of the email was a success strFeedBack = "*** Thank you, your information was successfully sent to Vitesse. ***" End If Set objMail = nothing 'end: using the CDONTS mail object to accomodate Magma's server component limitations End If ON ERROR GOTO 0 %> <%If strFeedBack <> "" Then%><%=("
" & strFeedback & "
")%><%End If%>