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?? -
IF NOT Upload.Form("toaddr") = "All" Then
-
rs.open "Select [PrimaryEmail] from [Tbl_Contacts-old] where [OrgCatID] = "&Upload.Form("toaddr")&"", db,3,3
-
Else
-
rs.open "Select [PrimaryEmail] from [Tbl_Contacts-old]", db,3,3
-
End IF
-
-
toaddr = ""
-
-
Counter = 0
-
While not rs.eof
-
Counter = Counter + 1
-
If Counter = 50 or Counter = 100 or Counter = 150 or Counter = 200 Then
-
toaddr = toaddr & rs("PrimaryEmail") & ";~"
-
Else
-
toaddr = toaddr & rs("PrimaryEmail") & "; "
-
End If
-
rs.movenext
-
wend
-
rs.close
-
'response.Write(toaddr)
-
'on error resume next
-
PrimaryEmailAddr=split(toaddr,"~")
-
maxcounter=ubound(PrimaryEmailAddr)
-
FOR counter=0 TO maxcounter
-
IndEmailAddr=PrimaryEmailAddr(counter)
-
response.Write(IndEmailAddr)
-
response.Write("<Br>")
-
-
Dim oMail, iConf, Flds
-
Set oMail = Server.CreateObject("CDO.Message")
-
'oMail.To = ""& Upload.Form("toaddr") &""
-
oMail.Bcc = ""&IndEmailAddr&""
-
'oMail.Cc = ""
-
'oMail.From = ""&Upload.Form("fromaddr")&""
-
oMail.From = info@mysite.com
-
oMail.Subject = ""& Upload.Form("subject") &""
-
'oMail.TextBody= ""
-
-
-
EmailStr=split(IndEmailAddr,";")
-
maxcounter1=ubound(EmailStr)
-
FOR counter1=0 TO maxcounter1
-
curremail1=EmailStr(counter1)
-
-
NEXT
-
-
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>" &_
-
"<br /><br> Best Regards,<br>Admin Team."
-
-
oMail.Send
-
Set oMail = Nothing
-
-
NEXT
-
-
3 5480
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? - oMail.HTMLBody = " To Unsubscribe from the mailing list please<a href=""http://mysite.com/process.asp?email=" & curremail1 & "&cancel=yes""> CLICK HERE</a>.</B>" &_
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
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.
Sign in to post your reply or Sign up for a free account.
Similar topics |
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
|
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:
|
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.
|
by: Nitish Korla |
last post by:
unsubscribe
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
|
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...
| |
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...
|
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
-----------------+--------------------------+-----------------------------------------------------
|
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=';...
|
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...
|
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...
|
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...
| |
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...
|
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...
|
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();...
|
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...
|
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
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |