473,405 Members | 2,415 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

CDONTS error - too much data?

I have been using the CDONTS component on Windows 2000 to send emails for a
long time now (code below).

However, over time, the report that I am sending has got rather longer and
it now gives me an "unknown exception" error. However, I know that it's
because there's now too much data (If I remove some of the text it goes
fine).

I've "compacted" the message as much as I can, but I've got up to the limit
now of how much I can compact it by...

I've tried to write it to a file and attach that, but the same size limit
appears to hold for attachments too.

What to do....?

Thanks in advance

Griff

----------------
public sub sendThatEmail(byVal sMessage, byVal asToAddressesArray)
Dim obOrderEmail
' Send the email
Set obOrderEmail = CreateObject("CDONTS.NewMail")
with obOrderEmail
.BodyFormat = 1
.MailFormat = 0
.From = sSystemAutomatedEmailSenderAddress
.Value("Reply-To") = sSystemAutomatedEmailReplyToAddress

.To = join(asToAddressesArray,";")

.Subject = "Billing Report"
.Body = sMessage
.Send
end with
Set obOrderEmail = Nothing
end sub
----------------------------


Sep 30 '05 #1
7 2027
Ditch CDONTS and switch to CDO.

http://aspfaq.com/show.asp?id=2026
http://aspfaq.com/show.asp?id=2119

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

"Griff" <Ho*****@The.Moon> wrote in message
news:es**************@TK2MSFTNGP15.phx.gbl...
I have been using the CDONTS component on Windows 2000 to send emails for a long time now (code below).

However, over time, the report that I am sending has got rather longer and
it now gives me an "unknown exception" error. However, I know that it's
because there's now too much data (If I remove some of the text it goes
fine).

I've "compacted" the message as much as I can, but I've got up to the limit now of how much I can compact it by...

I've tried to write it to a file and attach that, but the same size limit
appears to hold for attachments too.

What to do....?

Thanks in advance

Griff

----------------
public sub sendThatEmail(byVal sMessage, byVal asToAddressesArray)
Dim obOrderEmail
' Send the email
Set obOrderEmail = CreateObject("CDONTS.NewMail")
with obOrderEmail
.BodyFormat = 1
.MailFormat = 0
.From = sSystemAutomatedEmailSenderAddress
.Value("Reply-To") = sSystemAutomatedEmailReplyToAddress

.To = join(asToAddressesArray,";")

.Subject = "Billing Report"
.Body = sMessage
.Send
end with
Set obOrderEmail = Nothing
end sub
----------------------------


Sep 30 '05 #2
Looks like the way forward - thanks.

One quick question:
.Item(sch & "smtpserver") = "<enter_mail.server_here>"


What would one expect for "<enter_mail.server_here>" ? Not sure what to add
(or in what format)

Thanks!

Griff

PS One minor thing - Microsoft seem to have changed their pages around, so
some of the links to their site don't work :-(
Sep 30 '05 #3
You'll need to contact Aaron (ASPFAQ owner) about the broken links... (see
the "Feedback" link on the same page).

With regard to "<enter_mail.server_here>", this would be in the form;

"smtp.yourmailserver.com"

For example, had you been using the Microsoft server, this would be;

..Item(sch & "smtpserver") = "maila.!microsoft.com"

! added by me to prevent bot's

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

"Griff" <Ho*****@The.Moon> wrote in message
news:OS*************@tk2msftngp13.phx.gbl...
Looks like the way forward - thanks.

One quick question:
.Item(sch & "smtpserver") = "<enter_mail.server_here>"
What would one expect for "<enter_mail.server_here>" ? Not sure what to

add (or in what format)

Thanks!

Griff

PS One minor thing - Microsoft seem to have changed their pages around, so
some of the links to their site don't work :-(

Sep 30 '05 #4
As an aside, if you don't have your own dedicated mail server, use your
ISP's (if permitted) or, get yourself a copy of Argosoft;

www.argosoft.com

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

"Griff" <Ho*****@The.Moon> wrote in message
news:OS*************@tk2msftngp13.phx.gbl...
Looks like the way forward - thanks.

One quick question:
.Item(sch & "smtpserver") = "<enter_mail.server_here>"
What would one expect for "<enter_mail.server_here>" ? Not sure what to

add (or in what format)

Thanks!

Griff

PS One minor thing - Microsoft seem to have changed their pages around, so
some of the links to their site don't work :-(

Sep 30 '05 #5
Fantastic help - thanks Steven
Oct 3 '05 #6
The example given on:
http://www.w3schools.com/asp/asp_send_email.asp

Just shows the code required as:
<%
Set myMail=CreateObject("CDO.Message")
myMail.Subject="Sending email with CDO"
myMail.From="my****@mydomain.com"
myMail.To="so*****@somedomain.com"
myMail.TextBody="This is a message."
myMail.Send
set myMail=nothing
%>...without the need for setting up the configuration
details/fields.The CDONTS code (that this is replacing) did not have any
information for the SMTP server (it's all running locally) so would this be
able to pick up those details too?ThanksGriff
Oct 3 '05 #7
Yup - that seems to work fine for my needs.
Oct 3 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Guillaume Hanique | last post by:
Hello! Could anybody help me. I wrote a program that interprets information in a database, and can send information via email. The program works fine on my developer machine, but when I run...
6
by: Jon Montana | last post by:
CDONTS was working well until I installed Exchange 2000. I thought it might be a relay problem, but I allowed the server IP address to relay. Thanks for anything you can offer. here's the...
29
by: | last post by:
I did a working code with CDONTS on NT4 Now I am testing is on w2k and it looks like objCDONTS.Send is completely ignored. I think is it ignored because it throws no errors, neither does the...
1
by: | last post by:
Hi, I'm having a problem using CDONTS to send mail from my site. Recently we switched providers and since then the line Set objNewMail = CreateObject( "CDONTS.NewMail") is causing an...
6
by: kelsloris | last post by:
I have an asp app that uses CDONTS to send email notifications. On the .send method I get an error saying the specified path could not be found. Everything I find about this error refers to IMS and...
16
by: tshad | last post by:
I have both cdosys.dll and cdonts.dll on my W2K3 server. We have been told by our web authors that their asp code won't work on our machine and that we don't have CDONTS installed on our machine....
5
by: BaWork | last post by:
I have a web form where a client can select which site members to send an email to. This form is populated from the contents of the member table, so the form can have 0-x names listed on it...
12
by: Jeff | last post by:
I have a dedicated windows server on BlueGenesis. I'd like to send an email using ASP, but I'm getting this error message: Microsoft VBScript runtime error '800a01ad' ActiveX component...
6
by: jbguernsey | last post by:
for: There was no reference to CDO in the References so selected CDO. Code didn't work (CDONTS.email unrecognised). read There was no reference to CDONTS in the References so selected CDO....
0
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
0
BarryA
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
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...
0
agi2029
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 using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.