%'Include Data Connection%> <%'Include ADO constants include file for VBScript%> <% 'open data connection OpenConn() %> <% dim strFeedBack 'if the contact us form has been submitted then... If Request.Form <> "" Then dim objMailer dim strSubject dim strBody dim strFirstName dim strLastName dim strOrganization dim strDescription dim strEmail dim strRecipientName dim strRecipientEmail dim bolUserWishesToSubscribe dim strServerName dim strEducation dim intCountryOfFirstDegree 'get the server name into the strServerName variable strServerName = Request.ServerVariables("SERVER_NAME") 'set the information requestor's info into the releavant variables strFirstName = Session("ContactUsFirstName") strLastName = Session("ContactUsLastName") strOrganization = Session("ContactUsOrganization") strDescription = Session("ContactUsDescription") strEmail = Session("ContactUsEmail") bolUserWishesToSubscribe = Session("ContactUsWishesToSubscribe") 'if user wishes to subscribe then... If bolUserWishesToSubscribe Then 'set default values for strEducation and intCountryOfFirstDegree variables strEducation = "" intCountryOfFirstDegree = 0 'add user to the live subscribers list and subscribe him to all subscribeable posting types Call SubscribeContactUsRequestor(strFirstName, strLastName, strEmail, strOrganization, strEducation, intCountryOfFirstDegree) End If 'set the name and email address of the person that is to receive the contact us emails strRecipientName = "Vitesse Re-Skilling Canada Inc." strRecipientEmail = "info@vitesse.ca" 'strRecipientName = "GreenButton Studio Inc." 'strRecipientEmail = "shaun@greenbutton.ca" '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 strSubject = "Contact Us Info Request From " & strFirstName & " " & strLastName objMail.subject = strSubject 'set the body attribute of the Mailer object strBody = strFirstName & " " & strLastName & vbCRLF if strOrganization <> "" then strBody = strBody & strOrganization & vbCRLF strBody = strBody & strEmail & vbCRLF & vbCRLF if strDescription <> "" then strBody = strBody & "Brief inquiry description: " & strDescription & vbCRLF & vbCRLF 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. Someone will be in contact with you shortly." End If Set objMail = nothing 'end: using the CDONTS mail object to accomodate Magma's server component limitations End If %>
<% 'close data connection Call CloseConn() %>