<% @LANGUAGE = VBScript %> <% Option Explicit %> FlowVision Lean Flow, Lean Manufacturing, Kanban and Supply Chain Consulting, Training, and Workshops

Lean Calculator

<% 'Declaring Variables Dim smtpserver,youremail,yourpassword,ContactUs_Name,ContactUs_Email,ContactUs_phone,ContactUs_Title,ContactUs_Company,ContactUs_Street,ContactUs_City,ContactUs_State,ContactUs_Zip Dim ContactUs_Subject,ContactUs_Body,ContactUS_newsletter,Action,IsError,url ' Edit these 3 values accordingly smtpserver = "smtp.eikoncommunications.com" youremail = "flowvision@eikoncommunications.com" yourpassword = "eikon1" ' Grabbing variables from the form post ContactUs_Name = Request("ContactUs_Name") ContactUs_Title = Request("ContactUs_Title") ContactUs_Company = Request("ContactUs_Company") ContactUs_Street = Request("ContactUs_Street") ContactUs_City = Request("ContactUs_City") ContactUs_State = Request("ContactUs_State") ContactUs_Zip = Request("ContactUs_Zip") ContactUs_phone = Request("ContactUS_phone") ContactUs_Email = Request("ContactUs_Email") ContactUs_Subject = Request("ContactUs_Subject") ContactUs_Body = Request("ContactUs_Body") ContactUs_newsletter = Request("ContactUs_newsletter") 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 %> <% 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(ContactUs_Email) = "False" Then IsError = "Yes" Response.Write("You did not enter a valid email address.
") End If If ContactUs_Name = "" Then IsError = "Yes" Response.Write("You did not enter a Name.
") End If If ContactUs_Title = "" Then IsError = "Yes" Response.Write("You did not enter a Title.
") End If If ContactUs_Company = "" Then IsError = "Yes" Response.Write("You did not enter a Company.
") End If If ContactUs_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 & "Contact Us 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(ContactUs_Name,vbCr,"
") & "
" strBody = strBody & "Email" & " : " & " " & Replace(ContactUs_Email,vbCr,"
") & "
" strBody = strBody & "Subject dondo" & " : " & " " & Replace(ContactUs_Subject,vbCr,"
") & "
" strBody = strBody & "
" & Replace(ContactUs_Body,vbCr,"
") & "
" 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.Subject = "Lean Flow Calculator User from Web site" ObjSendMail.From = ContactUs_Email ' we are sending a html email.. simply switch the comments around to send a text email instead 'ObjSendMail.TextBody = strBody ObjSendMail.HTMLBody = "This person used the Lean Flow Calculator on the Web site" & vbCrLf & "
" & ContactUs_Name & vbCrLF & "
" & ContactUs_Title & vbCrLF & "
" & ContactUs_Company & vbCrLF & "
" & ContactUs_Email & vbCrLf & "
" & ContactUs_phone & vbCrLf & "
" & ContactUs_newsletter & vbCrLf & "
" & "Comments: " & ContactUs_Body ObjSendMail.Send Set ObjSendMail = Nothing Response.Redirect ("calculator.html") ' 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 Response.Redirect ("calculator.html") %> <% Else %>

Thank you for your interest inthe FlowVision Lean Flow Calculator. Please provide us with your contact information so we can follow up with you to answer any questions on the results of the calculator.

Please note that the Lean Flow Calculator is only meant to give you an estimate of the ROI you could receive from implementing Lean Flow in your business. These projections are not a guarantee of future results.

Name:

Title:

Company:

Email:

Telephone:

 

 

Comments:

 

 
<% End If %>

Lean Calculator




 

flowvision