|
RAPS Mentoring Application
2007-2008
<%
If Request("Submit") <> "" Then
DIM strfirstname, strmajor_semester, stremailaddress, phone1, phone2, phone3, college, address2, city, state, zipcode, story
strfirstname = Request.Form("firstname")
strmajor_semester= Request.Form("major_semester")
stremailaddress = Request.Form("emailaddress")
phone1 = Request.Form("phone1")
phone2 = Request.Form("phone2")
phone3 = Request.Form("phone3")
college = Request.Form("college")
one = Request.Form("one")
two = Request.Form("two")
three = Request.Form("three")
errorMessage = ""
' Error Check
IF strfirstname = "" THEN errorMessage = errorMessage & " First Name" END IF
IF strmajor_semester = "" THEN errorMessage = errorMessage & "Last Name" END IF
IF stremailaddress = "" THEN errorMessage = errorMessage & "Email Address" END IF
IF phone1 = "" OR phone2 = "" OR phone3 = "" THEN
errorMessage = errorMessage & "Phone"
END IF
IF college = "" THEN errorMessage = errorMessage & "Address" END IF
IF one = "" THEN errorMessage = errorMessage & "Question 1" END IF
IF two = "" THEN errorMessage = errorMessage & "Question 2" END IF
IF three = "" THEN errorMessage = errorMessage & "Question 3" END IF
'If there is an error, display the error, else, submit the email
IF errorMessage <> "" THEN
Response.Write "Please complete the following fields before submitting the form:" & errorMessage & "
"
ELSE
On error resume next
Dim bodyText
bodyText = bodyText & ""
bodyText = bodyText & "RAPS Mentor Application
"
bodyText = bodyText & "Contact Information
"
bodyText = bodyText & "Name: " & strfirstname & " " & strmajor_semester & "
"
bodyText = bodyText & "Major & Semester: " & strmajor_semester & "
"
bodyText = bodyText & "Email: " & stremailaddress & "
"
bodyText = bodyText & "Phone: (" & phone1 & ") " & phone2 & "-" & phone3 & "
"
bodyText = bodyText & "College/University: " & college & "
"
bodyText = bodyText & "Question 1: " & one & "
"
bodyText = bodyText & "Question 2: " & two & "
"
bodyText = bodyText & "Question 3: " & three & "
"
'Dim mySmartMail
Set mySmartMail = Server.CreateObject("aspSmartMail.SmartMail")
'Mail Server
mySmartMail.Server = "mail.opheliaproject.org"
'From
mySmartMail.SenderAddress = "do_not_reply@opheliaproject.org"
'To - dstasiewski@opheliaproject.org
mySmartMail.Recipients.Add "cveith@opheliaproject.org"
'Parameter
'mySmartMail.Priority = Request("Priority")
'Content Type
mySmartMail.ContentType = "text/html"
'Message
mySmartMail.Subject = "RAPS Mentor Application"
mySmartMail.Body = bodyText
'Send the message
mySmartMail.SendMail
if err.number <> 0 then
response.write("Unfortunately an error occurred while trying to submit the form. If the problem persists, download the PDF version to email or send back to us via mail so that we may add you to our database.
")
else
Response.redirect ("main/our_community_thanks.htm")
end if
set mySmartMail = nothing
END IF
End If
%>
|