%@ LANGUAGE="VBSCRIPT" %>
<% option explicit %>
<% Response.Buffer = True %>
<%
'Declaring Variables
Dim smtpserver,youremail,yourpassword,CSUN_Name,CSUN_Email,CSUN_Phone,CSUN_Company,CSUN_Title
Dim Indtravel,Allgps2,FSI,HIMS,HW,SS,Allgps3,Party,Action,IsError
' Edit these 3 values accordingly
smtpserver = "mail.senderogroup.com"
youremail = "kim@senderogroup.com"
yourpassword = "$bmcSG!02$"
' Grabbing variables from the form post
CSUN_Name = Request("CSUN_Name")
CSUN_Email = Request("CSUN_Email")
CSUN_Phone = Request("CSUN_Phone")
CSUN_Company = Request("CSUN_Company")
CSUN_Title = Request("CSUN_Title")
Indtravel = Request("Indtravel")
Allgps2 = Request("Allgps2")
FSI = Request("FSI")
HIMS = Request("HIMS")
HW = Request("HW")
SS = Request("SS")
Allgps3 = Request("Allgps3")
Party = Request("Party")
Action = Request("Action")
' Used to check that the email entered is in a valid format
Function IsValidEmail(Email)
Dim ValidFlag,BadFlag,atCount,atLoop,SpecialFlag,UserName,DomainName,atChr,tAry1
ValidFlag = False
If (Email <> "") And (InStr(1, Email, "@") > 0) And (InStr(1, Email, ".") > 0) Then
atCount = 0
SpecialFlag = False
For atLoop = 1 To Len(Email)
atChr = Mid(Email, atLoop, 1)
If atChr = "@" Then atCount = atCount + 1
If (atChr >= Chr(32)) And (atChr <= Chr(44)) Then SpecialFlag = True
If (atChr = Chr(47)) Or (atChr = Chr(96)) Or (atChr >= Chr(123)) Then SpecialFlag = True
If (atChr >= Chr(58)) And (atChr <= Chr(63)) Then SpecialFlag = True
If (atChr >= Chr(91)) And (atChr <= Chr(94)) Then SpecialFlag = True
Next
If (atCount = 1) And (SpecialFlag = False) Then
BadFlag = False
tAry1 = Split(Email, "@")
UserName = tAry1(0)
DomainName = tAry1(1)
If (UserName = "") Or (DomainName = "") Then BadFlag = True
If Mid(DomainName, 1, 1) = "." then BadFlag = True
If Mid(DomainName, Len(DomainName), 1) = "." then BadFlag = True
ValidFlag = True
End If
End If
If BadFlag = True Then ValidFlag = False
IsValidEmail = ValidFlag
End Function
%>
CSUN Presentation by Paul Ponchillia and Paul Colgan: Recent Advances in Indoor Wayfinding in the Hillcrest AB, 3rd Floor, Seaport Tower - Friday March 22, 1:20 PM, CSUN Session ID: IND-031
Sendero/Sweetman Activities Include:
Sendero and Sweetman's party in Harbor Suite 977 - Friday 5:00PM
Please fill out the following form to indicate your interest in the Sendero/Sweetman activities. Once we process your submission, we will confirm your Suite meeting place and time.
<%
If Action = "SendEmail" Then
' Here we quickly check/validate the information entered
' These checks could easily be improved to look for more things
If IsValidEmail(CSUN_Email) = "False" Then
IsError = "Yes"
Response.Write("You did not enter a valid email address. ")
End If
If CSUN_Name = "" Then
IsError = "Yes"
Response.Write("You did not enter your Name. ")
End If
If CSUN_Phone = "" Then
IsError = "Yes"
Response.Write("You did not enter a Phone Number. ")
End If
End If
' If there were no input errors and the action of the form is "SendEMail" we send the email off
If Action = "SendEmail" And IsError <> "Yes" Then
Dim strBody
' Here we create a nice looking html body for the email
strBody = strBody & "CSUN Form submitted at " & Now() & vbCrLf & "
"
strBody = strBody & "From http://" & Request.ServerVariables("HTTP_HOST") & vbCrLf & " "
strBody = strBody & "IP " & Request.ServerVariables("REMOTE_ADDR") & vbCrLf & " "
strBody = strBody & "Name" & " : " & " " & Replace(CSUN_Name,vbCr," ") & " "
strBody = strBody & "Email" & " : " & " " & Replace(CSUN_Email,vbCr," ") & " "
strBody = strBody & "Phone" & " : " & " " & Replace(CSUN_Phone,vbCr," ") & " "
strBody = strBody & "Company" & " : " & " " & Replace(CSUN_Company,vbCr," ") & " "
strBody = strBody & "Title" & " : " & " " & Replace(CSUN_Title,vbCr," ") & " "
strBody = strBody & "Sessions" & " : " & " "
if Indtravel<>"" then
strBody = strBody & "Indtravel"
end if
if Allgps2<>"" then
strBody = strBody & "Allgps2"
end if
if FSI<>"" then
strBody = strBody & "FSI"
end if
if HIMS<>"" then
strBody = strBody & "HIMS"
end if
if HW<>"" then
strBody = strBody & "HW"
end if
if SS<>"" then
strBody = strBody & "SS"
end if
if Allgps3<>"" then
strBody = strBody & "Allgps3"
end if
if Party<>"" then
strBody = strBody & "Party"
end if
strBody = strBody & " "
strBody = strBody & ""
Dim ObjSendMail
Set ObjSendMail = CreateObject("CDO.Message")
'This section provides the configuration information for the remote SMTP server.
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'Send the message using the network (SMTP over the network).
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = smtpserver
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False 'Use SSL for the connection (True or False)
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 'basic (clear-text) authentication
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") = youremail
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") = yourpassword
ObjSendMail.Configuration.Fields.Update
'End remote SMTP server configuration section==
ObjSendMail.To = youremail
ObjSendMail.From = CSUN_Email
ObjSendMail.Subject="CSUN 2018 Participation"
' we are sending a html email.. simply switch the comments around to send a text email instead
ObjSendMail.HTMLBody = strBody
'ObjSendMail.TextBody = strBody
ObjSendMail.Send
Set ObjSendMail = Nothing
' change the success messages below to say or do whatever you like
' you could do a response.redirect or offer a hyperlink somewhere.. etc etc
%>
Thank you for joining us at CSUN 2018! Stay tuned to this page for more details about CSUN. Once we process your submission, we will confirm your Suite meeting place and time.