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 5452
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 "IndEmailAddr" 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>" &_
You could change the link to say "To unsubscribe, send your email address as the subject line to 'unsubscribe@mySite.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...
|
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...
|
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 :
...
|
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...
|
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...
|
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 | ...
|
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à ...
|
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...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
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...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
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...
| |