%
'
' START OF SUBROUTINES
'
SUB sendmail(fromWhom, toWhom, Subject, Body)
Dim objCDO
Dim iConf
Dim Flds
Const cdoSendUsingPort = 2
Set objCDO = Server.CreateObject("CDO.Message")
Set iConf = Server.CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
With Flds
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServer) = "mail-fwd"
.Item(cdoSMTPServerPort) = 25
.Item(cdoSMTPconnectiontimeout) = 10
.Update
End With
Set objCDO.Configuration = iConf
objCDO.From = fromWhom
objCDO.To = toWhom
objCDO.Subject = Subject
objCDO.TextBody = MainBody
objCDO.Send
END SUB
'
' Set string values
'
fromWhom="query@spectros.com"
toWhom="repeater_1@spectros.com"
Subject="Web Query Automated Form"
success=TRIM( Request.Form("success") )
failure=TRIM( Request.Form("failure") )
name=TRIM( Request.Form("name") )
company=TRIM( Request.Form("company") )
address1=TRIM( Request.Form("address1") )
address2=TRIM( Request.Form("address2") )
city=TRIM( Request.Form("city") )
state=TRIM( Request.Form("state") )
zip=TRIM( Request.Form("zip") )
country=TRIM( Request.Form("country") )
product=TRIM( Request.Form("product") )
email=TRIM( Request.Form("email") )
phone=TRIM( Request.Form("phone") )
comments=TRIM( Request.Form("comments") )
MainBody= trim( "Generated Reply Form:" & vbCrLf _
& "name: " & name & "" & vbCrLf _
& "company: " & company & "" & vbCrLf _
& "address1: " & address1 & "" & vbCrLf _
& "address2: " & address2 & "" & vbCrLf _
& "city: " & city & "" & vbCrLf _
& "state: " & state & "" & vbCrLf _
& "zip: " & zip & "" & vbCrLf _
& "country: " & country & "" & vbCrLf _
& "product: " & product & "" & vbCrLf _
& "email: " & email & "" & vbCrLf _
& "phone: " & phone & "" & vbCrLf _
& "comments: " & comments & "" & vbCrLf _
& "" & vbCrLf & vbCrLf _
& "(form query ver 05.08.31)")
IF name<>"" THEN
'Send
sendMail fromWhom, toWhom, Subject, MainBody
'Redirect
Response.redirect "Spectros_QuerySuccess.htm"
'Cleanup
Set ObjCDO = Nothing
Set iConf = Nothing
Set Flds = Nothing
END IF
'
' END OF ROUTINES
'
%>
Request T-Stat Demo

|
Request a Demo
Please fill out the following information and press the SUBMIT button
at Bottom.
You may also call, write, or visit us. See Address and Phone by clicking
Here

|
|
|