gerjan
07-29-2003, 11:51 AM
Hello, I just came back from my hollyday and had an overloaded inbox with furious emails. I wrote a newsletter that worked perfect, BUT while I was on hollyday a bounche of new people subcribed thereselves for the newsletter. The problem is that I can't send to more than 50 addresses with BCC!
So to get to the point: I have to cut the sending from my newsletter in pieces. I have to send first to addresses 1-50 then 51-100 then 101-150 and so on.
I just don't have an idee how to do this.
Can somebody show me this in my code?
Tnx in advange! Gerjan :)
---------------------
<%
sqstring = "SELECT * FROM newsletter"
set objRS = objConn.execute (sqstring)
set email = objRS("email")
set achternaam = objRS("achternaam")
set id = objRS("id")
'SEND CONTENT
dim mailer
set mailer = Server.CreateObject("SMTPsvg.Mailer")
name = "cultuurvriend"
mailer.fromname = "private.nl"
mailer.remotehost = "smtp.private.nl"
mailer.fromaddress = "nieuwsbrief@private.nl"
'HERE I MAKE TO LOOP TO GET ADDRESSES FROM MY DB
' HOW CAN I MAKE THIS LOOP TILL 50 AND THEN START OVER FROM 51?
While not objRS.eof
mailer.AddBCC name, email
objRS.movenext
wend
mailer.subject = onderwerp
mailer.contenttype = "text/html"
mailer.bodytext = htmltext
mailer.sendmail
%>
-----------------
So to get to the point: I have to cut the sending from my newsletter in pieces. I have to send first to addresses 1-50 then 51-100 then 101-150 and so on.
I just don't have an idee how to do this.
Can somebody show me this in my code?
Tnx in advange! Gerjan :)
---------------------
<%
sqstring = "SELECT * FROM newsletter"
set objRS = objConn.execute (sqstring)
set email = objRS("email")
set achternaam = objRS("achternaam")
set id = objRS("id")
'SEND CONTENT
dim mailer
set mailer = Server.CreateObject("SMTPsvg.Mailer")
name = "cultuurvriend"
mailer.fromname = "private.nl"
mailer.remotehost = "smtp.private.nl"
mailer.fromaddress = "nieuwsbrief@private.nl"
'HERE I MAKE TO LOOP TO GET ADDRESSES FROM MY DB
' HOW CAN I MAKE THIS LOOP TILL 50 AND THEN START OVER FROM 51?
While not objRS.eof
mailer.AddBCC name, email
objRS.movenext
wend
mailer.subject = onderwerp
mailer.contenttype = "text/html"
mailer.bodytext = htmltext
mailer.sendmail
%>
-----------------