%
email = Request.form("txtemail")
Subs = "Subscription"
'Create variables to call stored procedures
Itisokay = FALSE
'Call first stored procedure
sSql = "HOS_EmailSubscriber('" & email & "')"
'sSql = "Select * "
'Establish first record set
set subscribeemail = server.createobject("adodb.recordset")
subscribeemail.open sSql, dataConn, 3, 1, 4
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
strEmail = "Thank you for joining our newsletter group." & chr(13) & chr(13)
strEmail = strEmail & "We will be sending you the next copy of “Little Heart” as soon as it is available." & chr(13) & chr(13)
strEmail = strEmail & "Please check the site at http://www.boatautomation.com anytime for additional information and updates." & chr(13)
'Save data to text file.
strText = """" & email & ""","
strText = strText & """" & Subs & ""","
strPath = Left(Request.ServerVariables("PATH_TRANSLATED"),InStrRev(Request.ServerVariables("PATH_TRANSLATED"),"\")) & "formresults\boatautoinfo.txt"
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
If objFSO.FileExists(strPath) Then
Set objFile = objFSO.OpenTextFile(strPath, 8, true)
objFile.WriteLine(strText)
End If
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'This sends email to you.
set objMessage = createobject("cdo.message")
set objConfig = createobject("cdo.configuration")
Set Flds = objConfig.Fields
Flds.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") =2
Flds.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") ="mail.boatautomation.com"
Flds.update
Set objMessage.Configuration = objConfig
objMessage.To = "littleheart@boatautomation.com"
objMessage.From = "littleheart@boatautomation.com"
objMessage.Subject = "From " & email & " Little Heart Newsletter Subscription"
objMessage.TextBody = strEmail
objMessage.fields.update
objMessage.Send
'set objMessage = nothing
set objConfig = nothing
If email <> "noemail@boatautomation.com" Then
'Set objMessage.Configuration = objConfig
objMessage.To = email
objMessage.From = "littleheart@boatautomation.com"
objMessage.Subject = "Little Heart Subscription"
objMessage.TextBody = strEmail
objMessage.fields.update
objMessage.Send
set objMessage = nothing
set objConfig = nothing
End If
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'cleanup server
Set objFSO = nothing
Set objFile = nothing
Set objCDOMail = nothing
%>
Heart of Sailing Foundation
|
<%=newslettersubdesc%>
| Thank you for joining our newsletter group |
| |
| You should receive an email soon to confirm your subscription. |
| |
| If you do not, please contact us at Little Heart |
|
|
|