% ' Always include the following file for form validation functions %> <% ' set the submit button to have a name of ACTION with the value of SUBMIT Action = Left(UCase(Request("Action")),5) If Action = "SUBMI" Then ' Check to see if the required fields are filled in! If Request.Form("RegisteredBy") = "" Or _ Request.Form("Company") = "" Or _ Request.Form("Email") = "" Then errmsg = "Please make sure all required fields have been filled!" End If 'check to see if the email entered is valid. If Request.Form("Email") <> "" then If Not IsEmail(Request.Form("Email")) Then errmsg="Please enter a valid email address!" End If End if 'If there are no errors, then lets send the email. If errmsg = "" Then 'Set MyCDONTSMail = CreateObject("CDONTS.NewMail") 'MyCDONTSMail.From= Request.Form("Email") 'MyCDONTSMail.To= "doug@digitaltea.com" 'MyCDONTSMail.Subject="ON-LINE QUOTE FORM" Set ObjSendMail = Server.CreateObject("CDO.Message") 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") ="127.0.0.1" 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.Update ObjSendMail.To = "dave@cvs-controls.com" ObjSendMail.Subject = "ON-LINE QUOTE FORM" ObjSendMail.From = Request.Form("Email") ' set the value of the body of the email. strBody = "You have received an ON-LINE QUOTE FORM." & vbCrLf & vbCrLf strBody = strBody & "Registered By: " & Request.Form("RegisteredBy") & vbCrLf strBody = strBody & "Company: " & Request.Form("Company") & vbCrLf strBody = strBody & "Facility: " & Request.Form("Facility") & vbCrLf strBody = strBody & "Address: " & Request.Form("Address") & vbCrLf strBody = strBody & "Province / State: " & Request.Form("ProvinceState") & vbCrLf strBody = strBody & "City: " & Request.Form("City") & vbCrLf strBody = strBody & "Postal / Zip Code: " & Request.Form("PostalZipCode") & vbCrLf strBody = strBody & "Country: " & Request.Form("Country") & vbCrLf strBody = strBody & "Email: " & Request.Form("Email") & vbCrLf strBody = strBody & "Phone: " & Request.Form("Phone") & vbCrLf strBody = strBody & "Fax: " & Request.Form("Fax") & vbCrLf & vbCrLf strBody = strBody & "Quantity: " & Request.Form("Quantity") & vbCrLf strBody = strBody & "Size: " & Request.Form("Size") & vbCrLf strBody = strBody & "Rating: " & Request.Form("Rating") & vbCrLf strBody = strBody & "End Conn.: " & Request.Form("EndConn") & vbCrLf strBody = strBody & "Style: " & Request.Form("Style") & vbCrLf strBody = strBody & "Model: " & Request.Form("Model") & vbCrLf strBody = strBody & "Port Size: " & Request.Form("PortSize") & vbCrLf strBody = strBody & "Trim Characteristics: " & Request.Form("Trim") & vbCrLf strBody = strBody & "Body Matl: " & Request.Form("BodyMatl") & vbCrLf strBody = strBody & "Trim Matl: " & Request.Form("TrimMatl") & vbCrLf strBody = strBody & "Bonnet: " & Request.Form("Bonnet") & vbCrLf strBody = strBody & "Seat: " & Request.Form("Seat") & vbCrLf strBody = strBody & "Other Seat: " & Request.Form("OtherSeat") & vbCrLf strBody = strBody & "Operating Temp Norm: " & Request.Form("TempNorm") & vbCrLf strBody = strBody & "Operating Temp Max: " & Request.Form("TempMax") & vbCrLf strBody = strBody & "Norm Inlet Pressure psi: " & Request.Form("pressure1") & vbCrLf strBody = strBody & "Norm Outlet Pressure psi: " & Request.Form("pressure2") & vbCrLf strBody = strBody & "Max Inlet Pressure psi: " & Request.Form("pressure3") & vbCrLf strBody = strBody & "Max Outlet Pressure psi: " & Request.Form("pressure4") & vbCrLf strBody = strBody & "Flow: " & Request.Form("Flow") & vbCrLf strBody = strBody & "Units: " & Request.Form("Units") & vbCrLf strBody = strBody & "Pipe Size: " & Request.Form("PipeSize") & vbCrLf strBody = strBody & "Pipe Sched: " & Request.Form("PipeSched") & vbCrLf & vbCrLf strBody = strBody & "Actuator: " & Request.Form("Actuator") & vbCrLf strBody = strBody & "Style / Model: " & Request.Form("StyleModel") & vbCrLf strBody = strBody & "Actuator Size: " & Request.Form("ActuatorSize") & vbCrLf strBody = strBody & "Fail Position: " & Request.Form("FailPosition") & vbCrLf strBody = strBody & "Signal: " & Request.Form("Signal") & vbCrLf strBody = strBody & "Other Signal: " & Request.Form("OtherSignal") & vbCrLf strBody = strBody & "Bench Set: " & Request.Form("BenchSet") & vbCrLf strBody = strBody & "Electric: " & Request.Form("Electric") & vbCrLf strBody = strBody & "Handwheel Override: " & Request.Form("Override") & vbCrLf strBody = strBody & "Other Actuator Information: " & Request.Form("OtherInfo") & vbCrLf & vbCrLf strBody = strBody & "Additional Comments: " & Request.Form("AdditionalComments") & vbCrLf & vbCrLf ObjSendMail.TextBody = strBody ObjSendMail.Send Set ObjSendMail = Nothing ' This line creates the email sender object. 'Set objNewMail = Server.CreateObject("Persits.MailSender") ' enter valid SMTP host 'objNewMail.Host = "smtp.telus.net" ' here we set the from address to the entered email address from the form. 'objNewMail.From = Request.form("Email") ' set this equal to the destination email address. 'objNewMail.AddAddress "dave@cvs-controls.com" 'objNewMail.AddAddress "doug@digitaltea.com" ' set the subject 'objNewMail.Subject = "ON-LINE QUOTE FORM" 'objNewMail.Body = strBody 'strErr = "" 'bSuccess = False 'On Error Resume Next ' catch errors 'objNewMail.Send ' send message 'If Err <> 0 Then ' error occurred ' strErr = Err.Description 'else ' bSuccess = True 'End If 'Set objNewMail = Nothing Response.redirect("thanks.asp") End If End If %>
![]() |
|
![]() |
|
|
|||||||||||||||||||||