<% Dim strTo, strSubject, strBody 'Strings for recipient, subject, body 'ASPEmail.DLL 'The Mail object strfirstname = Request.Form("firstname") strlastname = Request.Form("lastname") strtitle = Request.Form("title") straddress = Request.Form("address") strcity = Request.Form("city") strstate = Request.Form("state") strdelivery = Request.Form("delivery") strzip = Request.Form("zip") strTo = Request.Form("To") strconfirm_email = Request.Form("confirm_email") strcomments = Request.Form("comments") '------------------------------------------------------------------------------------------------------------ strSubject = "Mailing List Request" strBody = strBody & "Email List Request for CBS" strBody = strBody & vbCrLf & vbCrLf strBody = strBody & "Delivery Preference: " strBody = strBody & Request.Form("delivery") strBody = strBody & vbCrLf & vbCrLf strBody = strBody & "Name: " strBody = strBody & Request.Form("title") & " " & Request.Form("firstname") & " " & Request.Form("lastname") strBody = strBody & vbCrLf & vbCrLf strBody = strBody & "Street address: " strBody = strBody & Request.Form("address") strBody = strBody & vbCrLf & vbCrLf strBody = strBody & "City, State, Zip: " strBody = strBody & Request.Form("city") & " , " & Request.Form("state") & " " & Request.Form("zip") strBody = strBody & vbCrLf & vbCrLf strBody = strBody & "Email: " strBody = strBody & Request.Form("To") strBody = strBody & vbCrLf & vbCrLf strBody = strBody & "Confirm Email: " strBody = strBody & Request.Form("confirm_email") strBody = strBody & vbCrLf & vbCrLf strBody = strBody & "Additional comments: " strBody = strBody & Request.Form("comments") strBody = strBody & vbCrLf & vbCrLf strBody = strBody & vbCrLf ' quick validation routine. If strTo = "" Or Not IsValidEmail(strTo) Then %>

Join our mailing list and we'll keep you up to date on the latest events at
The 2006 Charleston Boat Show


Title:

Mr. Mrs. Ms.

First Name  

Last Name  

Email  

Confirm email address  

 How would you prefer to receive our newsletters?

If you chose by mail, please fill in the fields below;
otherwise they are optional

Address  

City  

State   Zip Code  
Comments:

<% Else Set objMail = Server.CreateObject("Persits.MailSender") objMail.Host = "mail.southconnect.com" objMail.Port = 25 objMail.From = "jacqui@jbmshows.com" objMail.AddAddress "megan@jbmshows.com" , "Megan" 'objMail.AddAddress "vasco@vwpweb.com" , "Jacqui" objMail.Subject = "CBS Mail List Request" objMail.Body = strBody objMail.Send Set objMail = Nothing Response.Write "" Response.Write "

" Response.Write "

" Response.Write "
Thank you for completing our online form! We will add you to our mailing list.
" Response.Write "" Response.Write "" End If %> <% ' Only functions and subs follow! Function IsValidEmail(strEmail) Dim bIsValid bIsValid = True If Len(strEmail) < 5 Then bIsValid = False Else If Instr(1, strEmail, " ") <> 0 Then bIsValid = False Else If InStr(1, strEmail, "@", 1) < 2 Then bIsValid = False Else If InStrRev(strEmail, ".") < InStr(1, strEmail, "@", 1) + 2 Then bIsValid = False End If End If End If End If IsValidEmail = bIsValid End Function %>