<%@ Language = VBScript %> <% Email = request.form("Email") 'Send an email to the bugger to confirm the email address if len(Email) <> 0 then 'Time to open the database set con = server.createObject("ADODB.Connection") con.open(strServerConnection) 'Check whether email exists sqlString = "Select Email from Newsletter where Email = '"&Email&"'" set rs = con.execute(sqlString) 'Return error if email already exists while not rs.eof if rs("Email") = Email then output = "This email is already in our database." blnError = true end if rs.moveNext wend if not blnError then sqlString = "Insert into Newsletter (Email, Status) values ('"&Email&"', 0)" con.execute(sqlString) con.close 'Compose email message here Message = "To confirm your subscription for our newsletter at "&CompanyName&" ("&DomainName&")," &vbCrLf Message = Message & "simply click on the following link:" & vbCrLf & "http://"&DomainName&"/newsletter/newsletterConfirmation.asp?email="&Email Message = Message & vbCrLf & vbCrLf & "If you did not sign up for this newsletter, then simply ignore this mail." &vbCrLf Signature = vbCrLf & "Important: Do not reply to this email." & vbCrLf & vbCrLf & "____________________" & vbCrLf Signature = Signature & CompanyName & vbCrLf & "http://"&DomainName set newMailObj = server.createObject("CDONTS.NewMail") newMailObj.BodyFormat = 1 newMailObj.MailFormat = 0 newMailObj.from = "no-reply@"&replace(DomainName, "www.", "") newMailObj.to = Email newMailObj.subject = CompanyName & " Newsletter Signup Confirmation." newMailObj.body = Message & Signature newMailObj.send set newMailObj = nothing output = "Signup successfully.

Please check your mailbox to confirm your subscription and activate your account." end if end if %> <%=CompanyName%> - Newsletter Subscription

Newsletter Subscription

<%=output%>

Email: 

WE DO NOT SHARE YOUR E-MAIL ADDRESS IN ANY OTHER PURPOSE

 

Home

Copyright © www.gurgaonsearch.com  Gurgaon Information News and Property  www.directory4india.com   www.seo4web.net