Is there a maximum number of emails CDONTS can handle in an asp script

H

Hugo Lefebvre

Is there a maximum number of emails CDONTS can handle in an asp script? I
have different questions about this.

Question1:

example1:
set objSendMail = createobject("CDONTS.NewMail")
......

objSendMail.To = emailto

objSendMail.CC = emailcc

objSendMail.BCC = emailbcc
objSendMail.Send
set objSendMail = nothing


is there a limit for the length of the strings 'email_to', 'emailcc' and
'emailbcc'?
is the number of e-mailadresses in the strings 'email_to', 'emailcc' and
'emailbcc' limited?


Question2:

I make a loop like this:

x = 0

do while x < 200
set objSendMail = createobject("CDONTS.NewMail")
......

objSendMail.To = emailaddress(x)
objSendMail.Send
set objSendMail = nothing

x = x + 1
loop

where 'emailaddress(x)' is a string of one e-mailaddress (first time:
emailaddres of person1, second time emailaddress of person2, ...)

Is there a limit for the loop: 50 or 100 or more?


The webserver is IIS and, I think, the smtp-server is Exchange Server.

Thanks for an answer.
 
A

Anthony Jones

Hugo Lefebvre said:
Is there a maximum number of emails CDONTS can handle in an asp script? I
have different questions about this.

Question1:

example1:
set objSendMail = createobject("CDONTS.NewMail")
......

objSendMail.To = emailto

objSendMail.CC = emailcc

objSendMail.BCC = emailbcc
objSendMail.Send
set objSendMail = nothing


is there a limit for the length of the strings 'email_to', 'emailcc' and
'emailbcc'?
is the number of e-mailadresses in the strings 'email_to', 'emailcc' and
'emailbcc' limited?


Question2:

I make a loop like this:

x = 0

do while x < 200
set objSendMail = createobject("CDONTS.NewMail")
......

objSendMail.To = emailaddress(x)
objSendMail.Send
set objSendMail = nothing

x = x + 1
loop

where 'emailaddress(x)' is a string of one e-mailaddress (first time:
emailaddres of person1, second time emailaddress of person2, ...)

Is there a limit for the loop: 50 or 100 or more?


The webserver is IIS and, I think, the smtp-server is Exchange Server.

I don't know about CDONTS. Its deprecated you should use CDOSYS. I'm not
aware of there being any limit to the size of To or CC fields. I've seen
some with 100s email addresses.

As for question 2 the only thing that would limit it is the SMTP server. If
it felt it was being abused it might take some action.
 
W

webmaster COV

Thanks for the answer, but i'd like to know the answer for CDONTS. Can
anyone help?

Thanks.
 
D

Dave Anderson

Hugo Lefebvre said:
...is there a limit for the length of the strings 'email_to', 'emailcc'
and 'emailbcc'?

Almost certainly.
...is the number of e-mailadresses in the strings 'email_to', 'emailcc'
and 'emailbcc' limited?
Ditto.


do while x < 200
set objSendMail = createobject("CDONTS.NewMail")
......

objSendMail.To = emailaddress(x)
objSendMail.Send
set objSendMail = nothing

x = x + 1
loop

where 'emailaddress(x)' is a string of one e-mailaddress (first time:
emailaddres of person1, second time emailaddress of person2, ...)

Is there a limit for the loop: 50 or 100 or more?

Yes. When x > 9007199254740992, VBScript will stop differentiating between x
and x+1. Before that happens, you are likely to run into
Server.ScriptTimeout (if this is an ASP script) or disk space in your
\mailroot\pickup\ directory. The size of your emailaddress() array seems to
be a limiting factor, as well.

Otherwise, no. You are creating and destroying the object in each pass
through the loop, so you never hit an inherent CDONTS.NewMail limit.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top