![]() |
||||
![]() |
![]() |
|||
![]() Copyright © 2003 NASCAR Silicon Motor Speedway. All rights reserved. Online Privacy Statement. |
Investor Relations Information Request <% Dim strTo, strEmail, strSubject, strBody 'Strings for recipient, sender, subject, body Dim objCDOMail 'The CDO object Dim strName, strAddr1, strAddr2, strCity, strState, strCountry Dim strCompany, strPhone, strPrivate, strOther 'First we'll read in the values entered strTo = "webInvestorRelations@SMSOnline.com" strSubject = "Request for Investor Information (from website)" strName = Request.Form("name") strAddr1 = Request.Form("addr1") strAddr2 = Request.Form("addr2") strCity = Request.Form("city") strState = Request.Form("state") strZip = Request.Form("zip") strCountry = Request.Form("country") strCompany = Request.Form("company") strPhone = Request.Form("phone") strEmail = Request.Form("email") strPrivate = Request.Form("private") strOther = Request.Form("other") strBody = "Name: " & strName & vbCrLf strBody = strBody & "Address: " & strAddr1 & vbCrLf strBody = strBody & "Address: " & strAddr2 & vbCrLf strBody = strBody & "City: " & strCity & vbCrLf strBody = strBody & "State: " & strState & vbCrLf strBody = strBody & "Zip: " & strZip & vbCrLf strBody = strBody & "Country: " & strCountry & vbCrLf strBody = strBody & "Company: " & strCompany & vbCrLf strBody = strBody & "Phone: " & strPhone & vbCrLf strBody = strBody & "Email: " & strEmail & vbCrLf strBody = strBody & "Private: " & strPrivate & vbCrLf strBody = strBody & "Other: " & strOther & vbCrLf 'We just check to see if someone has entered anything into the to field. 'If it's equal to nothing we show the form, otherwise we send the message. 'If you were doing this for real you might want to check other fields too 'and do a little entry validation like checking for valid syntax etc. ' The logic is a little confusing here, you retry if any required field ' is empty, or both checkboxes are empty If strName = "" OR strAddr1 = "" OR strCity = "" OR _ strState = "" OR strCountry = "" OR _ ( strPrivate = "" AND strOther = "" ) _ Then %> If you'd like to receive a FREE kit of Investor Information, please complete the form below and press the SEND button to submit your request. Required Fields * <% Else ' Create an instance of the NewMail object. Set objCDOMail = Server.CreateObject("CDONTS.NewMail") ' Set the properties of the object ' This syntax works fine ' objCDOMail.From = "webmaster@asp101.com" ' But this gets you the appearance of a real name! ' objCDOMail.From = "ASP 101 Webmaster Thank you. Your request has been emailed to our Corporate Office " Response.Write "and we will be in touch with you shortly. " Response.Write "In the event you wish to speak with us sooner, call us Toll Free at 1-866-825-8515. " Response.Write "Back to Investor Relations Information " End If %> |