To be kept notified, by email, whenever the website content is updated, simply enter you email address below and click on 'submit'.
Existing subscribers can choose to stop receiving email updates by selecting 'unsubscribe' and clicking on 'submit'.
(email addresses submitted on this page are not visible on the internet. They will not be revealed to third parties.)
<% subject="NCFHS Mailing list update" today=Date if Request.Form("T1") <> "" then Set adoCon = Server.CreateObject("ADODB.Connection") adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("notify.mdb") Set rsAddresses = Server.CreateObject("ADODB.Recordset") rsAddresses.CursorType = 2 rsAddresses.LockType = 3 if Request.Form("R1") = "subscribe" then body="Thankyou for subscribing to the NCFHS website mailing list. To unsubscribe visit www.dramsden.co.uk/ncfhs/notify.asp" message="Has been added to our mailing list. " SQL="Select email From table1 Where email='" & request.form("T1") & "'" set rsAddresses=adoCon.execute(SQL) If Not rsAddresses.EOF then response.write "This email address is already subscribed." already_exists="yes" rsAddresses.Close else rsAddresses.Close Set rsAddresses = Server.CreateObject("ADODB.Recordset") rsAddresses.CursorType = 2 rsAddresses.LockType = 3 strSQL = "SELECT * FROM table1" rsAddresses.Open strSQL, adoCon rsAddresses.AddNew rsAddresses.Fields("email") = Request.Form("T1") rsAddresses.Fields("date") = today rsAddresses.Update end if end if if Request.Form("R1") = "unsubscribe" then body="This email address has been removed from the NCFHS website mailing list. Thankyou. " message="has been removed from our mailing list. " SQL="Select email From table1 Where email='" & request.form("T1") & "'" set rsAddresses=adoCon.execute(SQL) If rsAddresses.EOF then response.write "This email address does not exist on our database." already_exists="yes" rsAddresses.close else rsAddresses.close strSQL = "DELETE * FROM table1 WHERE email='" & request.Form("T1") &"'" rsAddresses.Open strSQL, adoCon end if end if if already_exists <> "yes" then dim mailObj, cdoMessage, cdoConfig dim addrList 'Send email based on mail component. Uses global variables for parameters 'because there are so many. SendMail = "" set cdoMessage = Server.CreateObject("CDO.Message") set cdoConfig = Server.CreateObject("CDO.Configuration") cdoConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "intmail.atlas.pipex.net" cdoConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 cdoConfig.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 cdoConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 'You need to edit the next two lines cdoConfig.Fields("http://schemas.microsoft.com/cdo/configuration/sendusername") = "danram@dramsden.co.uk" cdoConfig.Fields("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "Sabre123" cdoConfig.Fields.Update set cdoMessage.Configuration = cdoConfig cdoMessage.From = "familyhistory@dramsden.co.uk" cdoMessage.ReplyTo = "familyhistory@dramsden.co.uk" cdoMessage.To = request.Form("T1") cdoMessage.Subject = subject cdoMessage.HtmlBody = body on error resume next cdoMessage.Send if Err.Number <> 0 then SendMail = "Email send failed: " & Err.Description & "." end if set cdoMessage = Nothing set cdoConfig = Nothing response.write(" ") response.write("Thankyou. ") response.write(request.form("T1")) response.write(" " & message ) response.write("You have been sent a confirmation email.") end if 'rsaddresses.Close Set rsaddresses = Nothing Set adoCon = Nothing end if %>