»
Resources
» News Letter Signup
Resources » News Letter Signup & Market Monitor Signup
Newsletter Subscription Form
*
Mandatory
<% Dim sql,emailsend,emailStr,subdateStr,pwdStr,responseStr,nameStr Dim msg,msgsubject,mailfrom,mailfromname,mailto,mailtoname,mailBCC,isTab isTab=false Session("subscrbeemail")="" if Trim(Request.Form("email"))<>"" then nameStr=Trim(Request.Form("txtName")) emailStr=Trim(Request.Form("email")) subdateStr=DateAdd("n",330,Now()) ipaddress=Request.ServerVariables("REMOTE_ADDR") GeoCountryVal=Fixquotes(Trim(Request.Form("cy"))) GeoRegionVal=Fixquotes(Trim(Request.Form("rg"))) GeoCityVal=Fixquotes(Trim(Request.Form("ct"))) dim spamStop2 spamStop2 = trim(request.form("EmailAddressrt")) if spamStop2 <> "" then response.End() end if if (Session("subscrbeemail")<>emailStr) then set dbconn=getDB() set rschkuser=Server.CreateObject("ADODB.Recordset") rschkuser.CursorType=3 sqlchkuser="select * from newsletter_subscribe where email='"& emailStr &"' " rschkuser.Open sqlchkuser,dbconn if rschkuser.RecordCount=0 then set rs=Server.CreateObject("ADODB.Recordset") rs.CursorType=3 sql="insert into newsletter_subscribe(firstname,email,subscribedate,sub_status,ipaddress,ipdetails,readstatus)values('"& fixQuotes(nameStr) &"','"& fixQuotes(emailStr) &"','"& subdateStr &"',0,'"& fixQuotes(ipaddress) &"','"& GeoCountryVal&"-"&GeoRegionVal&"-"&GeoCityVal &"',0)" dbconn.execute(sql) Session("subscrbeemail")=emailStr set rs_view=Server.CreateObject("ADODB.Recordset") rs_view.CursorType=3 sql_view="select sub_no, email, firstname from newsletter_subscribe where email='"& emailStr &"'" rs_view.Open sql_view,dbconn msg="
" msg=msg & "
" msg=msg & "
Hi
"& trim(rs_view(2)) &"
,
your E-Mail Id is
"& trim(rs_view(1)) &"
" msg=msg & "
" msg=msg & "
To activate Mex Nepal News Letter Subscription please Click
Here
" msg=msg & "
" msg=msg & "
" msg=msg & "
" msg=msg & "
(or) copy and paste the following link in your browser http://www.mexnepal.com/webpages/newsletter_active.asp?id="&rs_view(0)&"&emailid="&rs_view(1)&"
" msg=msg & "
" msg=msg & "
" msg=msg & "
" msg=msg & "
" msgsubject="MexNepal - Newsletter Signup" mailfrom="info@mexnepal.com" mailfromname="MexNepal" mailto=trim(rs_view(1)) mailtoname="MexNepal" mailBCC="graphics@kappsoft.com" dim hasSent ' response.Write(msg) hasSent=sendMail(msg,msgsubject,mailfrom,mailfromname,mailto,mailtoname,mailBCC) isTab=true responseStr="
Thankyou for subscribing to MexNepal Newsletter service. Please check your e-mail for activation.Activation link is sent to your email.
" else set rsemailchk=Server.CreateObject("ADODB.Recordset") rsemailchk.CursorType=3 sqlemailchk="select * from newsletter_subscribe where email='"& emailStr &"' and readstatus=0" rsemailchk.Open sqlemailchk,dbconn if rsemailchk.RecordCount>0 then Session("subscrbeemail")=emailStr set rs_view1=Server.CreateObject("ADODB.Recordset") rs_view1.CursorType=3 sql_view1="select sub_no, email, firstname from newsletter_subscribe where email='"& emailStr &"'" rs_view1.Open sql_view1,dbconn msg1="
" msg1=msg1 & "
" msg1=msg1 & "
Hi
"& trim(rs_view1(2)) &"
,
your E-Mail Id is
"& trim(rs_view1(1)) &"
" msg1=msg1 & "
" msg1=msg1 & "
To activate Mex Nepal News Letter Subscription please Click
Here
" msg1=msg1 & "
" msg1=msg1 & "
" msg1=msg1 & "
" msg1=msg1 & "
(or) copy and paste the following link in your browser http://www.mexnepal.com/webpages/newsletter_active.asp?id="&rs_view1(0)&"&emailid="&rs_view1(1)&"
" msg1=msg1 & "
" msg1=msg1 & "
" msg1=msg1 & "
" msg1=msg1 & "
" msgsubject1="MexNepal - Newsletter Signup" mailfrom1="info@mexnepal.com" mailfromname1="MexNepal" mailto1=trim(rs_view1(1)) mailtoname1="MexNepal" mailBCC1="graphics@kappsoft.com" dim hasSent1 ' response.Write(msg1) hasSent1=sendMail(msg1,msgsubject1,mailfrom1,mailfromname1,mailto1,mailtoname1,mailBCC1) isTab=false responseStr="
"&rschkuser(2)&" email
subscribed
already. But not
activated yet
. Please check your e-mail for activation. Activation link is sent to your email again.
" else set rs_reactive=Server.CreateObject("ADODB.Recordset") rs_reactive.CursorType=3 sql_reactive="select * from newsletter_subscribe where email='"& emailStr &"' and readstatus=2" rs_reactive.Open sql_reactive,dbconn if rs_reactive.RecordCount>0 then set rs_view2=Server.CreateObject("ADODB.Recordset") rs_view2.CursorType=3 sql_view2="select sub_no, email, firstname from newsletter_subscribe where email='"& emailStr &"'" rs_view2.Open sql_view2,dbconn msg2="
" msg2=msg2 & "
" msg2=msg2 & "
Hi
"& trim(rs_view2(2)) &"
,
your E-Mail Id is
"& trim(rs_view2(1)) &"
" msg2=msg2 & "
" msg2=msg2 & "
To activate Mex Nepal News Letter Subscription please Click
Here
" msg2=msg2 & "
" msg2=msg2 & "
" msg2=msg2 & "
" msg2=msg2 & "
(or) copy and paste the following link in your browser http://www.mexnepal.com/webpages/newsletter_active.asp?id="&rs_view2(0)&"&emailid="&rs_view2(1)&"
" msg2=msg2 & "
" msg2=msg2 & "
" msg2=msg2 & "
" msg2=msg2 & "
" msgsubject2="MexNepal - Newsletter Signup" mailfrom2="info@mexnepal.com" mailfromname2="MexNepal" mailto2=trim(rs_view2(1)) mailtoname2="MexNepal" mailBCC2="graphics@kappsoft.com" dim hasSent2 ' response.Write(msg2) hasSent2=sendMail(msg2,msgsubject2,mailfrom2,mailfromname2,mailto2,mailtoname2,mailBCC2) isTab=true responseStr="
Thankyou for subscribing to MexNepal Newsletter service again. Please check your e-mail for activation.Activation link is sent to your email.
" else isTab=false responseStr="
"&rschkuser(2)&" email
is already subscribed
to our newsletter service. Please subscribe with a new email id.
" end if end if end if else isTab=true responseStr="
"&Session("subscrbeemail")&" email is already subscribed to our newsletter service. Please subscribe with a new email id.
" end if else Session("subscrbeemail")="" isTab=false End if %>
View Sample
<% if isTab=false then%>
<%=responseStr%>
Name
*
:
E-Mail
*
:
<%If Len(GeoCountryVal)=0 Then %> <%End if%>
<% end if%> <%if isTab=true then%>
<%=responseStr%>
Back
<%end if%>