%@ Language=VBScript %>
<%
Dim objCDOMail 'The CDO object
'Variables for database processing
Dim CurrentDateTime
Dim dcnDB 'As ADODB.Connection
Dim rsReg
Dim ServerPath
ServerPath = Server.MapPath(".")
Dim DBLocation
DBLocation = ServerPath & "..\databases\FFS_emailaddr.mdb"
%>
<%
if isempty(Request.Form("SubmitRequest")) then
TheMessage1 = "Fast Feng Shui Newsletter Subscription Form"
TheMessage2 = "Note that fields with ** are required. "
else
TheName = Request.Form("Name")
TheEmailAddress = Request.Form("EmailAddress")
If Request.Form("HTML") = "HTML" then TheFormat = "HTML" else TheFormat = "Text"
TheMessage = Request.Form("Message")
FutureTitle = Request.Form("FFSProsperity") & vbCrLf & Request.Form("FFSWriters") & vbCrLf & Request.Form("FFSNewlyweds")
TheInterest = Request.Form("career") & vbCrLf & Request.Form("creativity") & vbCrLf & Request.Form("fame") & vbCrLf & Request.Form("family") & vbCrLf & Request.Form("travel") & vbCrLf & Request.Form("love") & vbCrLf & Request.Form("prosperity") & vbCrLf & Request.Form("spirituality")
if isempty(Request.Form("Name")) or Request.Form("Name") = "" then
TheMessage1 = "The form was not submitted."
TheMessage2 = "Name is required!"
elseif isempty(Request.Form("EmailAddress")) or Request.Form("EmailAddress") = "" then
TheMessage1 = "The form was not submitted."
TheMessage2 = "Email Address is required!"
elseif instr(Request.Form("EmailAddress"),"@") = 0 then
TheMessage1 = "The form was not submitted."
TheMessage2 = "Email Address is invalid!"
elseif instr(Request.Form("EmailAddress"),".") = 0 then
TheMessage1 = "The form was not submitted."
TheMessage2 = "Email Address is invalid!"
end if
if TheMessage1 <> "The form was not submitted." then
Set dcnDB = Server.CreateObject("ADODB.Connection")
cString = "fastfeng01"
dcnDB.Open cString
CurrentDateTime = Now
Set rsReg = Server.CreateObject("ADODB.Recordset")
rsReg.Open "SELECT * FROM subscribers", dcnDB, adOpenKeyset, adLockOptimistic
rsReg.AddNew
rsReg("date_entered") = CurrentDateTime
rsReg("name") = TheName
rsReg("email") = TheEmailAddress
rsReg("format") = TheFormat
rsReg("futuretitle") = FutureTitle
rsReg("interest") = TheInterest
rsReg("message") = TheMessage
rsReg.Update
rsReg.Close
dcnDB.Close
Set dcnDB = Nothing
TheMessage1 = "Thanks for subscribing with us."
TheMessage2 = "Your request has been submitted! Please enjoy the rest of the site."
EmailMessage = "Fast Feng Shui, request info/subscribe details:" _
& chr(13) & chr(13)
EmailMessage = EmailMessage & "Name: " & TheName & chr(13)
EmailMessage = EmailMessage & "Email Address: " & TheEmailAddress & chr(13)
EmailMessage = EmailMessage & "Email format: " & TheFormat & chr(13)
EmailMessage = EmailMessage & "Future Title(s): " & FutureTitle & chr(13)
EmailMessage = EmailMessage & "Interest(s): " & TheInterest & chr(13)
EmailMessage = EmailMessage & "Message: " & TheMessage & chr(13)
WelcomeMessage = "Dear " & TheName & "," & vbCrLf & vbCrLf
WelcomeMessage = WelcomeMessage & AutoReply
' Create an instance of the NewMail object.
' Send auto reply to signee
Set objCDOMail = Server.CreateObject("CDONTS.NewMail")
' Set the properties of the object
objCDOMail.From = "Stephanie Roberts"
objCDOMail.To = TheEmailAddress
objCDOMail.Subject = "Welcome to Fast Feng Shui"
objCDOMail.Body = WelcomeMessage
' Send the message!
objCDOMail.Send
' Set the object to nothing because it immediately becomes
' invalid after calling the Send method.
Set objCDOMail = Nothing
' Create an instance of the NewMail object.
' Send info request to HM
Set objCDOMail = Server.CreateObject("CDONTS.NewMail")
' Set the properties of the object
objCDOMail.From = TheName & "<" & TheEmailAddress & ">"
objCDOMail.To = "lotuspnd@pixi.com"
objCDOMail.Subject = "New Subscriber!"
objCDOMail.Body = EmailMessage
' Send the message!
objCDOMail.Send
Set objCDOMail = Nothing
end if
end if
%>
Fast Feng Shui Newsletter
We also invite you to fill in the form below
to subscribe to our twice-monthly newsletter. Each informative issue
provides one or more of the following:
FREE feng shui tips to enhance
a particular area of your life and home
Announcements when new articles and/or
ebooks are made available on the site
Special product/services discount
offers available to subscribers only
Occasionally, FREE beta-testing
information products (ebooks and/or home study courses) available
to volunteers selected from our subscriber base
<% if TheMessage1 <> "Thanks for subscribing with us." then %>
<% end if %>
Very important! Several ISP's have become extremely cautious
in blocking legitimate emails and newsletters and you may not be
able to receive the Fast Feng Shui newsletter because of that. In
an effort to eliminate every possible problem, we ask that individuals
using spam filters in their email programs (such as AOL and Hotmail)
place our newsletter address, stephanie@fastfengshui.com,
in your address book (AOL), safe list (Hotmail) or whitelist (some
spam filters).
(You can also subscribe to the newsletter
by sending an email to subscribe@fastfengshui.com with "subscribe"
on the Subject line. Thank you.)
Note: By providing us your email
address, you agree to receive occasional notices
about new books, articles, and offers available at www.fastfengshui.com.
Details on
how to opt out of the list will be included in each message. Your
email address will
be kept strictly confidential. Please read our Privacy
Policy.