%@LANGUAGE="VBSCRIPT"%>
[an error occurred while processing this directive]
[an error occurred while processing this directive]
[an error occurred while processing this directive]
<%
Dim rs, nextpage
Set rs = Nothing
nextpage="confirm.asp"
Dim aname, firstname, lastname, zip, email, product, required
Dim address, city, astate, phone, howlocated, comments
CR = Chr(13) 'Carriege Return
sendMail="JMail"
UpdateDB="true"
Submitted="false"
smtpServer = "mail.fathertimes.biz"
'fromAddr = "fathertimes@fathertimes.biz"
toAddr = "fathertimes@fathertimes.biz"
'toAddr = "jjschuh@jonesday.com"
'########################################################################
if Request.Form("submitForm")="true" Then ' *** SUBMIT FORM ***
'########################################################################
'Required Fields
aname=Request.Form("name")
'firstname=Request.Form("firstname")
'lastname=Request.Form("lastname")
zip=Request.Form("zip")
email=Request.Form("email")
product=Request.Form("product")
'Optional Fields
address=Request.Form("address")
city=Request.Form("city")
astate=Request.Form("state")
phone=Request.Form("phone")
howlocated=Request.Form("Howlocated")
comments2=Request.Form("Comments")
'Build Comments
comments=Date() & " " & Time() & CR & "Product interested in: " & product & CR
comments=comments & "How located: " & howlocated & CR & CR
comments=comments & comments2
'Response.write("*****
" & comments & "
*****")
if aname="" or zip="" or email="" or product="" then required="FALSE"
aname2=Split(aname," ")
firstname=aname2(0)
lastname=""
For i=1 To UBound(aname2)
lastname=lastname & aname2(i)
Next
'##################################################################################
if required<>"FALSE" then 'all required fields have been entered so process
'##################################################################################
Dim TBdy 'Create Body of email
TBdy = "
| | |
"
TBdy = TBdy & "| Name: | "& firstname & " " & lastname & " |
"
TBdy = TBdy & "| Address: | " & address & " |
"
TBdy = TBdy & "| | " & city & ", " & astate & " " & zip & " |
"
TBdy = TBdy & "| Phone: | " & phone & " |
"
TBdy = TBdy & "| Email: | " & email & " |
"
TBdy = TBdy & "| Product: | " & product & " |
"
TBdy = TBdy & "| How Located: | " & howlocated & " |
"
TBdy = TBdy & "| Comments: | " & comments2 & " |
"
out=TBdy
'###################################################################################
if sendMail = "JMail" then 'Send email using JMail
'###################################################################################
Dim mailObj
set mailObj = Server.CreateObject("JMail.SMTPMail")
mailObj.Silent = true
mailObj.ServerAddress = smtpServer
mailObj.Sender = email
mailObj.ReplyTo = email
mailObj.Subject = "FatherTimes Customer"
mailObj.AddRecipient toAddr
mailObj.ContentType = "text/html"
mailObj.Body = TBdy
if not mailObj.Execute then
SendMail = "Email send failed: " & mailObj.ErrorMessage & "."
end if
Set mailObj=nothing
end if
'#####################################################################################
'####################################################################
if sendMail="CDONTS" then ' *** SEND MAIL ***
'####################################################################
Dim MyCDO
Set MyCDO = Server.CreateObject("CDONTS.NewMail")
If IsObject (MyCDO) Then
MyCDO.From = "FatherTimes@FatherTimes.biz (Mr Originating)"
MyCDO.To = "Fathertimes@fathertimes.biz (Mr recipient)"
MyCDO.Subject = "FatherTimes Customer"
MyCDO.Body = TBdy
MyCDO.Importance = 1
MyCDO.value("Reply-to")="reply@mail.com"
'MyCDO.AttachFile = "e:\files\catalog.zip"
'MyCDO.Send
Set MyCDO = nothing
Response.Write("Message sent")
Else
Response.Write("Message not sent")
End If
'##############################
end if 'end email
'##############################
'####################################################################
if UpdateDB="true" then ' *** UPDATE DATABASE ***
'####################################################################
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Source="cust"
rs.ActiveConnection=conn2
rs.lockType=adLockPessimistic
rs.cursorType=adOpenKeyset
rs.cursorLocation=adUseServer
rs.Open
rs.AddNew
rs("date")=Date()
rs("lastname")=lastname
rs("firstname")=firstname
rs("address")=address
rs("state")=astate
rs("city")=city
rs("email")=email
rs("Zip")=zip
rs("phone")=phone
rs("recontactdate")=Date()
rs("comments")=comments
rs("formofcontact")="Email"
rs.Update
Session("custid")=rs("custid")
'Session("custid")=60
rs.close()
'##############################
end if 'end update
'##############################
set rs=Nothing
Response.Redirect(nextPage)
end if 'all required fields
End If 'end form process
%>
Home Decor Products at Father Times: Decorative Home Accents, Home Decor Accent, Home Decor Items, Home Decor Accessories
[an error occurred while processing this directive]
|