Discussion:
CDO.Message TO property size limit
(too old to reply)
vbphil
2008-02-07 15:25:01 UTC
Permalink
So, I have a VB6 program running on a Win2003 64Bit server that sends email
using CDO.Message. The scope of the program is expanding to where a single
email message may have to be sent to several hundred email addresses.

The program creates a list of users logged into a particular program and
sends them a status email message. The possible user count is going up to
several hundred so I'm wondering if there is a restriction on how long the TO
property string can be in the CDO.Message component. Should I take steps to
send out several duplicate emails with a reduced set of TO addresses?

Set oNewMail = New CDO.Message
oNewMail.Subject = "subject line"
oNewMail.TextBody = "message text"
oNewMail.To = sTo
oNewMail.From = sFrom
oNewMail.Send
Set oNewMail = Nothing

thanks, -phil
--
no place like 127.0.0.1
Dan Mitchell
2008-02-07 15:57:51 UTC
Permalink
Post by vbphil
I'm wondering if there is a restriction
on how long the TO property string can be in the CDO.Message
component. Should I take steps to send out several duplicate emails
with a reduced set of TO addresses?
First thing: the addresses probably shouldn't all be in the to: field,
unless there aren't any privacy issues and you are deliberately telling
everyone that gets this email about everyone else's email address.

Second: depending on the mail server, some servers may not send on
messages with too many recipients as an anti-spam measure.

Third: some servers may not _accept_ (or relay) messages with too many
recipients.

Fourth -- when you say "cdo.message", presumably you're using CDONTS
(CDOSYS) -- that's just a wrapper for SMTP, and RFC2822 doesn't list any
limits on length of the to/cc/bcc fields, but you'd have to check to see
if the server you're using imposes limits (on length, as well as number
of recipients -- if you have 2000 ***@b.com people, that's different to
2000 ***@wordysubdomain.companywithlotsofletters.com)

Basically, you'll have to test it and find out, it depends on the
environment.

-- dan
vbphil
2008-02-07 16:21:00 UTC
Permalink
Yes CDOSYS. Thanks for the pointers.
--
no place like 127.0.0.1
Post by Dan Mitchell
Post by vbphil
I'm wondering if there is a restriction
on how long the TO property string can be in the CDO.Message
component. Should I take steps to send out several duplicate emails
with a reduced set of TO addresses?
First thing: the addresses probably shouldn't all be in the to: field,
unless there aren't any privacy issues and you are deliberately telling
everyone that gets this email about everyone else's email address.
Second: depending on the mail server, some servers may not send on
messages with too many recipients as an anti-spam measure.
Third: some servers may not _accept_ (or relay) messages with too many
recipients.
Fourth -- when you say "cdo.message", presumably you're using CDONTS
(CDOSYS) -- that's just a wrapper for SMTP, and RFC2822 doesn't list any
limits on length of the to/cc/bcc fields, but you'd have to check to see
if the server you're using imposes limits (on length, as well as number
Basically, you'll have to test it and find out, it depends on the
environment.
-- dan
Loading...