<%@LANGUAGE = "VBSCRIPT"%> <% ' ================== MAILSENDER v. 1.0 ================== ' Code compiled by Will Collis [will@netsibition.co.uk] ' ' I do not provide any warranty or support. ' I am NOT liable for any use or misuse of this script. ' If you have any problems or queries. Google for it. ' HTMLArea v2 is by InteractiveTools [www.htmlarea.com] ' ' NB: The attachment functionality sends files from the ' computer that the script resides on. For Localhost use ' you are OK to attach. If you are using this on a server ' you should remember that the file path relates to the ' server's file structure, even the though the dialogue ' box asks for files on the client computer. You should ' remove or modify this yourself if this is a problem. ' ' If I get the time, I may well release a full-blown "v.2" ' with various email component support and a file upload ' for better attachment management. Thanks & Enjoy. ' ======================================================= ' ======================================================= ' LEON - ERROR CHECKING - VALID EMAIL ' ======================================================= 'Begin with basic RegExp function to validate email addresses Function EmailCheck(sEmail) EmailCheck = false Dim regEx, retVal Set regEx = New RegExp regEx.Pattern ="^[\w-\.]{1,}\@([\da-zA-Z-]{1,}\.){1,}[\da-zA-Z-]{2,4}$" regEx.IgnoreCase = true retVal = regEx.Test(sEmail) If not retVal Then exit function End If EmailCheck = true End Function ' ======================================================= ' LEON - STORES CURRENT TIME AS VAR ' ======================================================= DateTime = Now() 'Store current time as variable %> American Autoclave Company - Email Inquiry

 

 

 

 

 

 

 

 

 

 

 

 

 



American Autoclave Quote Request Form


<% If Request.Querystring("send") = "True" Then fmTo="robert@americanautoclave.com" fmFrom="leon@americanautoclave.com" fmFromName="AAC Website Inquiry" fmCC="mrstack@comcast.net" fmSubject="New Inquiry at the American Autoclave Co. Website" 'fmTo = Trim(Request.Form("fmTo")) 'fmFrom = Trim(Request.Form("fmFrom")) 'fmFromname = Trim(Request.Form("fmFromName")) 'fmCC = Trim(Request.Form("fmCC")) 'fmSubject = Trim(Request.Form("fmSubject")) ' ======================================================= ' LEON - ADDED ENTRIES ' ======================================================= CompanyName = Trim(Request.Form("CompanyName")) ContactName = Trim(Request.Form("ContactName")) ContactTitle = Trim(Request.Form("ContactTitle")) Address = Trim(Request.Form("Address")) Address2 = Trim(Request.Form("Address2")) ' Address3 = Trim(Request.Form("Address3")) City = Trim(Request.Form("City")) State = Trim(Request.Form("State")) Zip = Trim(Request.Form("Zip")) Country = Trim(Request.Form("Country")) Phone = Trim(Request.Form("Phone")) DirectPh = Trim(Request.Form("DirectPh")) Fax = Trim(Request.Form("Fax")) Email = Trim(Request.Form("Email")) Website = Trim(Request.Form("Website")) Industry = Trim(Request.Form("Industry")) HeardUsThrough = Trim(Request.Form("HeardUsThrough")) DueDate = Trim(Request.Form("DueDate")) QuoteType = Trim(Request.Form("QuoteType")) IntendedAutoclaveUsage = Trim(Request.Form("IntendedAutoclaveUsage")) WorkingDiameter = Trim(Request.Form("WorkingDiameter")) WorkingDiameterUnits = Trim(Request.Form("WorkingDiameterUnits")) WorkingLength = Trim(Request.Form("WorkingLength")) WorkingLengthUnits = Trim(Request.Form("WorkingLengthUnits")) MaxWorkingTemp = Trim(Request.Form("MaxWorkingTemp")) MaxWorkingTempUnits = Trim(Request.Form("MaxWorkingTempUnits")) ' MaxRatedTemp = Trim(Request.Form("MaxRatedTemp")) ' MaxRatedTempUnits = Trim(Request.Form("MaxRatedTempUnits")) MaxHeatingRate = Trim(Request.Form("MaxHeatingRate")) MaxHeatingRateUnits = Trim(Request.Form("MaxHeatingRateUnits")) MaxWorkingPressure = Trim(Request.Form("MaxWorkingPressure")) MaxWorkingPressureUnits = Trim(Request.Form("MaxWorkingPressureUnits")) ' MaxRatedPressure = Trim(Request.Form("MaxRatedPressure")) ' MaxRatedPressureUnits = Trim(Request.Form("MaxRatedPressureUnits")) ' MaxPressurizationRate = Trim(Request.Form("MaxPressurizationRate")) ' MaxPressurizationRateUnits = Trim(Request.Form("MaxPressurizationRateUnits")) PressurizationMethod = Trim(Request.Form("PressurizationMethod")) PressureSupplySource = Trim(Request.Form("PressureSupplySource")) HeatingMethod = Trim(Request.Form("HeatingMethod")) VoltagePhase = Trim(Request.Form("VoltagePhase")) WaterSupplySource = Trim(Request.Form("WaterSupplySource")) ' NumberOfAirTCs = Trim(Request.Form("NumberOfAirTCs")) NumberOfPartTCs = Trim(Request.Form("NumberOfPartTCs")) TCType = Trim(Request.Form("TCType")) VacuumRequired = Trim(Request.Form("VacuumRequired")) VacuumSupplySource = Trim(Request.Form("VacuumSupplySource")) NumOfVacuumMonitors = Trim(Request.Form("NumOfVacuumMonitors")) PartLoadType = Trim(Request.Form("PartLoadType")) PartLoadWeight = Trim(Request.Form("PartLoadWeight")) PartLoadWeightUnits = Trim(Request.Form("PartLoadWeightUnits")) ToolLoadType = Trim(Request.Form("ToolLoadType")) ToolLoadWeight = Trim(Request.Form("ToolLoadWeight")) ToolLoadWeightUnits = Trim(Request.Form("ToolLoadWeightUnits")) ControlMethod = Trim(Request.Form("ControlMethod")) NotesBox = Trim(Request.Form("NotesBox")) ' ======================================================= Call SendMail(fmTo,fmFrom,fmFromName,fmCC,fmSubject,CompanyName,ContactName,ContactTitle,Address,Address2,City,State,Zip,Country,Phone,DirectPh,Fax,Email,Website,Industry,HeardUsThrough,DueDate,QuoteType,IntendedAutoclaveUsage,WorkingDiameter,WorkingDiameterUnits,WorkingLength,WorkingLengthUnits,MaxWorkingTemp,MaxWorkingTempUnits,MaxHeatingRate,MaxHeatingRateUnits,MaxWorkingPressure,MaxWorkingPressureUnits,PressurizationMethod,PressureSupplySource,HeatingMethod,VoltagePhase,WaterSupplySource,NumberOfPartTCs,TCType,VacuumRequired,VacuumSupplySource,NumOfVacuumMonitors,PartLoadType,PartLoadWeight,PartLoadWeightUnits,ToolLoadType,ToolLoadWeight,ToolLoadWeightUnits,ControlMethod,NotesBox) Else Response.Write("Estimated fill-out time 7 Minutes.

We welcome you to preface any technical fields in this form with 'approx.' or simply: 'unknown' or 'undecided.' We will submit to you the most accurate quote based on the detail and scope of the provided information.

An American Autoclave Representative will follow up with you shortly.


Please Note: The Fields Marked with an * are required") End If %>




1) How may we reach you?
Company Name: *    
Contact Name: * Contact Title:
Address:
   
City: * State/Province:
Zip: Country: *
Company Phone: Direct PH/Cell:
Email: * Fax:
Company Website:
Industry: *
Where did you hear about us?    *

2) When do you need our quote?
Due Date: *

3) What type of quote would you like us to prepare?
Quote for:
Budget
Firm Fixed Price

4) What do you intend to use the unit for?
Proposed Use of Autoclave: *  

5) What are the required internal dimensions of the Autoclave?
Working Diameter:
Feet
Meters
Working Length:
Feet
Meters

6) What are the operational parameters of the autoclave?
Max Working Temp:
°F
°C
Max Heating Rate:
°F/Min
°C/Min
Max Working Pressure:
PSIG
BAR

7) How will the autoclave be pressurized?
Pressurization method:

The Autoclave will be using an existing source at your site.
Request a quote for an American Autoclave Co. supplied pressurization system.

8) How will the autoclave be heated?
Heating method:   If Electric: Voltage/Phase

The Autoclave will be using an existing water supply source/system at your site for cooling.
Request a quote for American Autoclave Co. supplied closed loop cooling.

10) Thermocouple Selection:
Number of Part assignable TC's:
TC Type:

11) Vacuum System Selection:
Does your autoclave require Vacuum Functionality?
Yes
No
If Yes:
The Autoclave will be using an existing vacuum source/system at your site.
Request a quote on an American Autoclave Co. supplied vacuum system.

Number of Vacuum Lines/Monitors:

12) What Part and Tool loads will be processed in your Autoclave?
Part Load:
Type:

   
Weight:
lbs
kg
Tool Load:
Type:

   
Weight:
lbs
kg

13) Control Method of the Autoclave:
Control Method:


14) Additional Information:
Notes:




 
<% ' ======================================================= ' LEON - SEND MAIL ROUTINE ' ======================================================= 'Begin Routine to Send Mail Sub SendMail(smTo,smFrom,smFromName,smCC,smSubject,smCompanyName,smContactName,smContactTitle,smAddress,smAddress2,smCity,smState,smZip,smCountry,smPhone,smDirectPh,smFax,smEmail,smWebsite,smIndustry,smHeardUsThrough,smDueDate,smQuoteType,smIntendedAutoclaveUsage,smWorkingDiameter,smWorkingDiameterUnits,smWorkingLength,smWorkingLengthUnits,smMaxWorkingTemp,smMaxWorkingTempUnits,smMaxHeatingRate,smMaxHeatingRateUnits,smMaxWorkingPressure,smMaxWorkingPressureUnits,smPressurizationMethod,smPressureSupplySource,smHeatingMethod,smVoltagePhase,smWaterSupplySource,smNumberOfPartTCs,smTCType,smVacuumRequired,smVacuumSupplySource,smNumOfVacuumMonitors,smPartLoadType,smPartLoadWeight,smPartLoadWeightUnits,smToolLoadType,smToolLoadWeight,smToolLoadWeightUnits,smControlMethod,smNotesBox) On Error Resume Next 'To catch any potential errors in the sending ' ======================================================= ' LEON - Array's to help manage Content of Email's being sent out. ' ======================================================= dim emlBody(57) dim emlCaptions(57) emlCaptions(0)="" emlCaptions(1)="" emlCaptions(2)="" emlCaptions(3)="" emlCaptions(4)="" emlCaptions(5)="Company Name: " emlCaptions(6)="Contact Name & Title: " emlCaptions(7)="" emlCaptions(8)="Address lines 1 & 2: " emlCaptions(9)="" emlCaptions(10)="" emlCaptions(11)="City, State/Province, Zip, Country:" emlCaptions(12)="" emlCaptions(13)="" emlCaptions(14)="Main Company & Direct Phone: " emlCaptions(15)="Fax: " emlCaptions(16)="Email: " emlCaptions(17)="Website: " emlCaptions(18)="Industry & Autoclave Intended Use: " emlCaptions(19)="Heard Us Through: " emlCaptions(20)="Quote Type & Quote Due by: " emlCaptions(21)="" emlCaptions(22)="" emlCaptions(23)="Working Diameter & Length: " emlCaptions(24)="" emlCaptions(25)="" emlCaptions(26)="" emlCaptions(27)="Max Working Temp & Heat Rate: " emlCaptions(28)="" emlCaptions(29)="" emlCaptions(30)="" emlCaptions(31)="Max Working Pressure & Units: " emlCaptions(32)="" emlCaptions(33)="" emlCaptions(34)="" emlCaptions(35)="" emlCaptions(36)="" emlCaptions(37)="" emlCaptions(38)="" emlCaptions(39)="Pressurization Method: " emlCaptions(40)="Pressure Supply Source: " emlCaptions(41)="Heating Method & Voltage/Phase: " emlCaptions(42)="" emlCaptions(43)="Water Supply Source: " emlCaptions(44)="" emlCaptions(45)="Number Of Part TCs & Type: " emlCaptions(46)="" emlCaptions(47)="Vacuum Required: " emlCaptions(48)="If Vacuum, Vac. Supply Source:" emlCaptions(49)="If Vacuum, # of Vac Monitors:" emlCaptions(50)="Part Load Type & Weight & Units: " emlCaptions(51)="" emlCaptions(52)="" emlCaptions(53)="Tool Load Type & Weight & Units: " emlCaptions(54)="" emlCaptions(55)="" emlCaptions(56)="Control Method: " emlCaptions(57)=smContactName & ", of " & smCompanyName & "'s Notes: " 'Formatting for auto-generated email presentation if smPhone = "" then ' Create a place holder, blank spot for completing later. smPhone="" & " _________________ " & "" end if if smAddress <> "" then ' Create a place holder, blank spot for completing later. smAddress=smAddress & "" & ", " & "" end if if smNumberOfPartTCs <> "" then ' Create a place holder, blank spot for completing later. smNumberOfPartTCs=smNumberOfPartTCs & "" & ", " & "" end if if smQuoteType = "" then ' Create a place holder, blank spot for completing later. smQuoteType="" & " _________________ " & "" end if if smWorkingDiameter = "" then ' Create a place holder, blank spot for completing later. smWorkingDiameter="" & " _________________ " & "" end if if smMaxWorkingTemp = "" then ' Create a place holder, blank spot for completing later. smMaxWorkingTemp="" & " _________________ " & "" end if if smHeatingMethod = "" then ' Create a place holder, blank spot for completing later. smHeatingMethod="" & " _________________ " & "" end if if smIndustry <> "" then ' Create a place holder, blank spot for completing later. smIndustry=smIndustry & "" & ", " & "" end if if smPartLoadType = "" then ' Create a place holder, blank spot for completing later. smPartLoadType="" & " _________________ " & "" end if if smToolLoadType = "" then ' Create a place holder, blank spot for completing later. smToolLoadType="" & " _________________ " & "" end if emlBody(0)="" emlBody(1)="" emlBody(2)="" emlBody(3)="" emlBody(4)="" emlBody(5)=smCompanyName emlBody(6)=smContactName & "" & ", " & "" & smContactTitle emlBody(7)="" emlBody(8)=smAddress & smAddress2 emlBody(9)="" emlBody(10)="" emlBody(11)=smCity & ", " & smState & ", " & smZip & ", " & smCountry emlBody(12)="" emlBody(13)="" emlBody(14)="" & "Main Ph: " & "" & smPhone & "" & ", Direct: " & "" & smDirectPh emlBody(15)=smFax emlBody(16)=smEmail emlBody(17)=smWebsite emlBody(18)=smIndustry & smIntendedAutoclaveUsage emlBody(19)=smHeardUsThrough emlBody(20)=smQuoteType & "" & ", Due By: " & "" & smDueDate emlBody(21)="" emlBody(22)="" emlBody(23)=smWorkingDiameter & " " & smWorkingDiameterUnits & "" & " x " & "" & smWorkingLength & " " & smWorkingLengthUnits emlBody(24)="" emlBody(25)="" emlBody(26)="" emlBody(27)=smMaxWorkingTemp & " " & smMaxWorkingTempUnits & "" & ", @ Rate of: " & "" & smMaxHeatingRate & " " & smMaxHeatingRateUnits emlBody(28)="" emlBody(29)="" emlBody(30)="" emlBody(31)=smMaxWorkingPressure & " " & smMaxWorkingPressureUnits emlBody(32)="" emlBody(33)="" emlBody(34)="" emlBody(35)="" emlBody(36)="" emlBody(37)="" emlBody(38)="" emlBody(39)=smPressurizationMethod emlBody(40)=smPressureSupplySource emlBody(41)=smHeatingMethod & "" & ", If Elec., Voltage/PH: " & "" & smVoltagePhase emlBody(42)="" emlBody(43)=smWaterSupplySource emlBody(44)="" emlBody(45)=smNumberOfPartTCs & smTCType emlBody(46)="" emlBody(47)=smVacuumRequired emlBody(48)=smVacuumSupplySource emlBody(49)=smNumOfVacuumMonitors emlBody(50)=smPartLoadType & "" & " with Weight of: " & "" & smPartLoadWeight & " " & smPartLoadWeightUnits emlBody(51)="" emlBody(52)="" emlBody(53)=smToolLoadType & "" & " with Weight of: " & "" & smToolLoadWeight & " " & smToolLoadWeightUnits emlBody(54)="" emlBody(55)="" emlBody(56)=smControlMethod emlBody(57)=smNotesBox ' ======================================================= ' LEON - START Building up the emails. ' ' inqBody = email to send to customer ' aacBody = email to send to AAC Recipient ' ======================================================= dim aacBody dim inqBody ' aacBody = "

An Inquiry has been made at www.americanautoclave.com


" 'Original Code 2009-12-14 - testing new formatting aacBody = "

An Inquiry has been made at www.americanautoclave.com

" inqBody = "

***This is an automated response to your inquiry with American Autoclave Company***

The following is a summary of what you have submitted:

" 'aacBody = aacBody & "
" inqBody = inqBody & "
" for i=0 to 57 if emlCaptions(i) <> "" then ' uncomment this to have the Email display all fields (even empty ones) if emlBody(i) = "" then ' uncomment this to have the Email display only the fields filled out by inquirer. emlBody(i)="" & "________________" & "" end if inqBody = inqBody & "" & "" aacBody = aacBody & "" & "" end if next aacBody = aacBody & "
" & " " & emlCaptions(i) & "" & " " & emlBody(i) & "" & "
" & " " & emlCaptions(i) & "" & " " & emlBody(i) & "" & "
" inqBody = inqBody & "" inqBody = inqBody & "
We will respond to your inquiry shortly.
In the meantime, if you have any questions or comments, or would just like to drop us a line... We welcome you to contact us at the following:

American Autoclave Co.
http://www.americanautoclave.com
rfstack@comcast.net
West Coast: 253-863-5000
East Coast: 706-692-4480
Central States: 425-836-5086
" smSubject = smCompanyName & " - " & smSubject smCCall = smCC & "; " & "leon@americanautoclave.com" 'This is the list of AAC recipients for the Submitted Inquiry emails strErr = "" 'Init variable to store any error message If EmailCheck(smEmail) = False Then strErr = strErr & "
  • The provided e-mail Address seems to be incorrect.
  • " End If If Len(smFromName) > 0 Then smFromage = smFromName & "<" & smFrom & ">" End If ' ======================================================= ' LEON - FORM HAS PASSED DATA VALIDATION, NOW SEND ' ======================================================= If strErr = "" Then 'If form data has passed basic validation then send Set iMsg = CreateObject("CDO.Message") iMsg.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 iMsg.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "localhost" iMsg.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 iMsg.Configuration.Fields.Update With iMsg .To = smTo .From = smFromage ' If Len(smCC) > 0 Then 'Commented out since we are cc'ing .CC = smCCall ' End If .Subject = smSubject .HTMLBody = aacBody ' .TextBody = smComments ' If Len(smAttach) > 0 Then ' Set iBp = .AddAttachment(smAttach) ' End If .Send 'SEND MAIL End With ' ======================================================= ' LEON - NOW CLEAN UP AFTER OURSELVES ' ======================================================= 'Clean Up Set iMsg = Nothing Set thnxMsg = CreateObject("CDO.Message") thnxMsg.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 thnxMsg.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "localhost" thnxMsg.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 thnxMsg.Configuration.Fields.Update With thnxMsg .To = smEmail .From = "leon@americanautoclave.com" .Subject = "Thank you for your interest - the American Autoclave Team!" .HTMLBody = inqBody .Send 'SEND MAIL End With ' ======================================================= ' LEON - NOW CLEAN UP AFTER OURSELVES ' ======================================================= 'Clean Up Set thnxMsg = Nothing 'If Len(smAttach) > 0 Then 'NOTE: KEPT AS EXAMPLE 'Set iBp = Nothing 'End If ' ======================================================= ' LEON - ERROR - SERVER - COMPONENT ERROR MESSAGE ' ======================================================= If Err > 0 Then 'If a server/component error occurred Response.Write("Mail Not Sent! Error(s) Occurred:") Response.Write("") Else 'Success! Mail Sent Response.Write("

    Mail Sent!


    To: American Autoclave Co. on " & FormatDateTime(DateTime,vbLongDate) & " at " & FormatDateTime(DateTime,vbLongTime)) smTo = "" smFrom = "" smFromName = "" smCC = "" smSubject = "" smCompanyName = "" smContactName = "" smContactTitle = "" smAddress = "" smAddress2 = "" smCity = "" smState = "" smZip = "" smCountry = "" smPhone = "" smDirectPh = "" smFax = "" smEmail = "" smWebsite = "" smIndustry = "" smHeardUsThrough = "" smDueDate = "" smQuoteType = "" smIntendedAutoclaveUsage = "" smWorkingDiameter = "" smWorkingDiameterUnits = "" smWorkingLength = "" smWorkingLengthUnits = "" smMaxWorkingTemp = "" smMaxWorkingTempUnits = "" smMaxHeatingRate = "" smMaxHeatingRateUnits = "" smMaxWorkingPressure = "" smMaxWorkingPressureUnits = "" smPressurizationMethod = "" smPressureSupplySource = "" smHeatingMethod = "" smVoltagePhase = "" smWaterSupplySource = "" smNumberOfPartTCs = "" smTCType = "" smVacuumRequired = "" smVacuumSupplySource = "" smNumOfVacuumMonitors = "" smPartLoadType = "" smPartLoadWeight = "" smPartLoadWeightUnits = "" smToolLoadType = "" smToolLoadWeight = "" smToolLoadWeightUnits = "" smControlMethod = "" smNotesBox = "" End If ' ======================================================= ' LEON - ERROR - DATA - INPUT INCORRECT ERROR MESSAGE ' ======================================================= Else 'Else, Form data incorrect - write out the error(s) Response.Write("


    Mail Not Yet Sent...

    Please correct the following & Resend:") Response.Write("