Subscription

<% Dim FirstName, LastName, Email, Submit, bProcess, strErrorMessage FirstName = Request.Form("FirstName") LastName = Request.Form("LastName") Email = Request.Form("Email") HighSchool = Request.Form("HighSchool") University = Request.Form("University") Business = Request.Form("Business") if HighSchool = "yes" Then HighSchoolChecked = "checked" if University = "yes" Then UniversityChecked = "checked" if Business = "yes" Then BusinessChecked = "checked" Submit = Request.Form("Submit") strErrorMessage = "" bProcess = False If len(Submit) > 0 Then bProcess = True If bProcess Then 'Validate data If len(FirstName) = 0 Then strErrorMessage = strErrorMessage & "
First Name is a required field." End If If len(LastName) = 0 Then strErrorMessage = strErrorMessage & "
Last Name is a required field." End If If len(Email) = 0 Then strErrorMessage = strErrorMessage & "
Email is a required field." End If If len(strErrorMessage) > 0 Then bProcess = False strErrorMessage = strErrorMessage & "
" End if End iF If bProcess Then 'Send it Set cdoConfig = CreateObject("CDO.Configuration") With cdoConfig.Fields .Item(cdoSendUsingMethod) = cdoSendUsingPort .Item(cdoSMTPServer) = "mx1.iserve.net.nz" .Update End With Set cdoMessage = CreateObject("CDO.Message") With cdoMessage Set .Configuration = cdoConfig .From = "no-reply@passingexams.co.nz" .To = "info@passingexams.co.nz" .Subject = "Passing Exams - subscription request" .TextBody = "First Name=" & FirstName & vbcrlf & "Last Name=" & LastName & vbcrlf & "Email=" & Email & vbcrlf .TextBody = .TextBody & "Areas of interest : " if HighSchool = "yes" Then .TextBody = .TextBody & "HighSchool " if University = "yes" Then .TextBody = .TextBody & "University " if Business = "yes" Then .TextBody = .TextBody & "Business " .Send End With Set cdoMessage = Nothing Set cdoConfig = Nothing Response.write "Thank you for your subscription request." Else 'Show the form %> To receive news and updates from PassingExams.co.nz please enter the required information below.
<%Response.Write(strErrorMessage)%>
First Name
Last Name
Email
Area of interest > High School
  > University
  > Business
 


Please note that the information you provide is for the express purpose of receiving emailed news and updates from PassingExams.co.nz and your details will not be shared with any other party. <% End If %>