Click to See Complete Forum and Search --> : first 1-50 then 51-100 then 101-151 etc.


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

%>

-----------------

gerjan
07-31-2003, 06:35 AM
Hi!
What am I doing wrong?
I tried to test it with the following but I don't get any Data from my DB (when I do it without
"(objRS.RecordCount Mod 50) = 0" it works fine).


'WHAT'S WRONG HERE?
while not objRS.eof
If (objRS.RecordCount Mod 50) = 0 Then
response.write nummer & "<br><br> volgende 50 <br> <br>"
end if
objRS.movenext
wend


p.s. I also tried to put "end if" behind "objRS.movenext" but that didn't help either.
Tnx! Gerjan

pelegk1
07-31-2003, 07:19 AM
it's all build in already and u dont need to do anything
it will be done 4 u

gerjan
07-31-2003, 07:27 AM
Ok, tnx for the advice.
Maybe in the future I go to .NET.
For now, my hosting provider does'nt provide .NET, so it must be done in ASP.

So please, does anyone know what I'm doing wrong?

Gerjan

gerjan
07-31-2003, 09:16 AM
Aahh, ok! tnx. I try it.

Still one little question.
Because, ofcourse, I don't have over 100 private e-mail addresses, do you know a way to test this?