473,623 Members | 3,366 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Unsubscribe link in EMAIL

91 New Member
Hi, I have a database of more than 1000 users. I am sending an email to 50 users at a time using CDO. What i do is get all the email addresses first & then split them into a batch of 50 email addresses & send email batch by batch. That means I send out 20 emails ( with 50 users in each mail). This works PERFECT.
How do I put a Unsubscribe link in my email. I am confused as how to put EMAILADDRESS of each user in my code for unsubscribe??

Expand|Select|Wrap|Line Numbers
  1. IF NOT Upload.Form("toaddr") = "All" Then
  2. rs.open "Select [PrimaryEmail] from [Tbl_Contacts-old] where [OrgCatID] = "&Upload.Form("toaddr")&"", db,3,3
  3. Else
  4. rs.open "Select [PrimaryEmail] from [Tbl_Contacts-old]", db,3,3
  5. End IF
  6.  
  7. toaddr = ""
  8.  
  9. Counter = 0
  10. While not rs.eof
  11. Counter = Counter + 1
  12. If Counter = 50 or Counter = 100 or Counter = 150 or Counter = 200 Then 
  13. toaddr = toaddr & rs("PrimaryEmail") & ";~"
  14. Else
  15. toaddr = toaddr & rs("PrimaryEmail") & "; "
  16. End If
  17. rs.movenext
  18. wend
  19. rs.close
  20. 'response.Write(toaddr)
  21.  'on error resume next
  22. PrimaryEmailAddr=split(toaddr,"~")
  23. maxcounter=ubound(PrimaryEmailAddr)
  24. FOR counter=0 TO maxcounter
  25.    IndEmailAddr=PrimaryEmailAddr(counter)
  26.    response.Write(IndEmailAddr)
  27.    response.Write("<Br>")
  28.  
  29.  Dim oMail, iConf, Flds
  30. Set oMail = Server.CreateObject("CDO.Message")
  31. 'oMail.To   = ""& Upload.Form("toaddr") &""
  32. oMail.Bcc = ""&IndEmailAddr&""
  33. 'oMail.Cc = ""
  34. 'oMail.From   = ""&Upload.Form("fromaddr")&""
  35. oMail.From   = info@mysite.com
  36. oMail.Subject   = ""& Upload.Form("subject") &""
  37. 'oMail.TextBody= ""
  38.  
  39.  
  40.    EmailStr=split(IndEmailAddr,";")
  41.  maxcounter1=ubound(EmailStr)
  42.  FOR counter1=0 TO maxcounter1
  43.      curremail1=EmailStr(counter1)
  44.  
  45.  NEXT 
  46.  
  47. oMail.HTMLBody =  ""&Upload.Form("message")&"" & "<br><p><p><b> To Unsubscribe from the mailing list please<a href=""http://mysite.com/process.asp?email=" & curremail1 & "&cancel=yes""> CLICK HERE</a>.</B>" &_
  48.                 "<br /><br> Best Regards,<br>Admin Team."
  49.  
  50. oMail.Send
  51. Set oMail = Nothing
  52.  
  53. NEXT
  54.  
  55.  
Feb 4 '09 #1
3 5480
kashif73
91 New Member
By unsubscribe I mean providing a link in the email I sent. & once the user clicks on the link his email is automatically removed from the DB. the problem is how do I write user email address in the link:?? Since in my variable "IndEmailAd dr" I have 50 email addresses, I know how to split them but how do i write them individually in each mail, which is sent out?

Expand|Select|Wrap|Line Numbers
  1. oMail.HTMLBody =  " To Unsubscribe from the mailing list please<a href=""http://mysite.com/process.asp?email=" & curremail1 & "&cancel=yes""> CLICK HERE</a>.</B>" &_              
Feb 4 '09 #2
jhardman
3,406 Recognized Expert Specialist
You could change the link to say "To unsubscribe, send your email address as the subject line to 'unsubscribe@my Site.com'" or "Click here to unsubscribe" and send them to a site where they enter their email address. I know, it's less elegant than an individualized response, but I see that type of solution fairly often.

Jared
Feb 4 '09 #3
kashif73
91 New Member
Thxs Jared, yeh this I can do, but was trying to find a way where the user just click on UNSUBSCRIBE link & gets deleted automatically.
Feb 4 '09 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1292
by: Faust, Chris | last post by:
-----Original Message----- From: python-list-request@python.org Sent: Tuesday, July 08, 2003 9:46 AM To: python-list@python.org Subject: Python-list digest, Vol 1 #16415 - 14 msgs Send Python-list mailing list submissions to python-list@python.org
4
2026
by: zsh-users-help | last post by:
Hi! This is the ezmlm program. I'm managing the zsh-users@sunsite.dk mailing list. To confirm that you would like python-list@python.org removed from the zsh-users mailing list, please send an empty reply to this address:
7
3418
by: Angelos | last post by:
Hello... I wrote a simple subscribe script that when a user completes the subscription form he gets added in the database and then he receives an e-mail where he/she clicks on the follow link : <a href=www.mysite.com?confirm&subscribers_id=mysql_insert_id($rs_subscriber_id)>Confirm</a> and gets added in the newsletter subscribers.
0
473
by: Nitish Korla | last post by:
unsubscribe ---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
7
1606
by: Alex | last post by:
Hi, I just installed pg 7.4.1 on a new system P4, 3.2Gh HT, 1GB Mem, RH9 and discovered that some of the processes have become extremely slow. Mainly I am talking about a SELECT COUNT(*) or VACUUM. Before running the same database on a P4. 2Ghz 412MB mem, I got the job done in some cases half the time. The weird thing however is, that normal inserts seem to be much faster on the new system and I am wondering if it is Postgres or HW...
2
1830
by: Joe | last post by:
Hi, I have a newsletter subscribe page. A user enters email address and clicks Subscribe button. That email address is added to database. Say this is a career newsletter. Is it possible to create an intelligent system that will work such a way that every time a new job is added on the website, a newsletter is sent to all the email address that are currently in the database. I guess this is possible if one has a CMS (Content Management...
12
1543
by: Edmund Dengler | last post by:
Hi folks! A query I am running does not seem to use indexes that are available (running version 7.4.2). I have the following table: => \d replicated Table "public.replicated" Column | Type | Modifiers -----------------+--------------------------+-----------------------------------------------------
1
3064
by: Lampa Dario | last post by:
I'd like to create a little script to allow users to remove from mailing list. I use the folowing code $remove_msg='Lei riceve questo messaggio poiché si è iscritto alla newsletter. Potrà revocarla in ogni momento. Per non ricevere la nostra Newsletter, clicchi qui:'; $urlmail='<a href="http://www.mysite.com/Mailing/unsubscribe.php?email=';...
2
3557
by: Cox | last post by:
Hello: My address jsmith435@cox.net is subscribed to at least the PHP General mailing list. I have for days now been trying to unsubscribe from all PHP mail lists. I have followed the instructions posted on the php.net web site but all my e-mails go unresponded to. I've tried contacting the webmaster as well as the admin address posted but all to no avail. I've tried using the link provided in each message to unsub but again no...
0
8221
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8603
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8463
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6104
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5560
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4067
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2593
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1769
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1468
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.