CDONTS.Send ignored

G

Guest

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 rest of
the code setting
objCDONTS=Server.CreateObject("CDONTS.NewMail") and then manipulating its
properties.

Do I need to somehow set IIS5 to make objCDONTS.Send work?
 
G

Guest

-----Original Message-----
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 rest of
the code setting
objCDONTS=Server.CreateObject("CDONTS.NewMail") and then manipulating its
properties.

Do I need to somehow set IIS5 to make objCDONTS.Send work?


.
If on Win 2000 use cdo. See this
http://www.aspfaq.com/show.asp?id=2026

HTH
Mike
 
R

Ray at

What makes you think it's being ignored? If it's because you didn't receive
an e-mail, look into issues with SMTP. All that CDONTS does is generate a
text file in e-mail format and put it in the SMTP server's pickup directory.
From that point on, it's up to SMTP to send the e-mail.

Ray at work
 
G

Guest

Thanks, I'll try.
But one thing puzzles me - in one plase your resouce says CDONTS is
depricated and not shipped with Windows, whereas in another place is said
that it is suppoerted by w2000 and is included in OS

As it does not cause error, I suppose it is included in 2000
 
G

Guest

What makes you think it's being ignored? - my ignorance.
Also last time I used that object on my ISP in October, it worked fine.
But I cannot remember if I tried if on my local PC.

Obviously SMTP is beyond the scope of this NG, yet perhaps you can advise
where I can read about it? Is it part of IIS5?

Also what do you think about Mikes opinion regarding CDONTS/CDO ?
 
G

Guest

So the problem should be with SMTP, as Ray suggested

Also it means that on a local PC is is not supposed to work without SMTP
tuning, unless it gets installed and tuned by default during installation
of w2k Pro -does it?
 
R

Ray at

What makes you think it's being ignored? - my ignorance.
Also last time I used that object on my ISP in October, it worked fine.
But I cannot remember if I tried if on my local PC.

Obviously SMTP is beyond the scope of this NG, yet perhaps you can advise
where I can read about it? Is it part of IIS5?

Yes, it's part of IIS. There is an SMTP MS newsgroup. Search "smtp" in
your news group list. I forget exactly what it's called.
..inetserver.iis.smtp_nntp maybe. Also, www.iisfaq.com may have info.
Also what do you think about Mikes opinion regarding CDONTS/CDO ?

I agree with him. The only reason to use CDONTS over CDO is if you are
stuck on an NT server and cannot change that. If you're all W2K or higher,
I suggest switching to CDO.

Ray at work
 
C

Curt_C [MVP]

CDONTS is not the same thing as SMTP
CDONTS is an interface TO the SMTP service.
Look in your c:\inetpub\mailroot folder tree for the message(s) you wrote.
If they are in there then CDONTS did it's part and SMTP isn't confiugred
right.

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
 
G

Guest

It might be relevant - I've just discovered that the FileSystemObject on the
same w2k ISP server behaves the same way as CDONTS - produces no error and
no result as if it is ignored.
It is supposed to create a file on the server, and although the code runs
without producing error messages, no file is created. It obviously worked
earlier and I still have several files streated previously.

Is FileSystemObject, like CDONTS, also dependent on some other service
which might be disabled?
 
R

Ray at

Can you show your code that is not returning an error and also not doing
what you expect it to do? There is something else going on here.

Ray at work
 
G

Guest

I have it indeed, but next to it goes

If err.number <> 0 then
Response.write("Errors occurred while saving your form
submission.")
Else
Response.write "The Order has been saved to " & fPath &". <a
href=/data/orders/" & fName &
".xml><br/>View the Order as an XML file</a><p/>"
End If

So I understand that I should have "Errors occurred while saving your form
submission."
But I do have "The Order has been saved to" which means that err.number <>
0
Yet no file was created

But I was wrong in my previous message blaming FileSystemObject.
The file in question is supposed to be created by Microsoft.XMLDOM object
and
"ON ERROR RESUME NEXT" goes after
Set objDom = Server.CreateObject("Microsoft.XMLDOM")
some manipulations to form a file name and the path to place it into
objDom.Save (path and file name)

I stress, that it worked previously on ISP w2000 server and still works on
my local w2000
 
G

Guest

Ray,

I left come idea od what I am doing in my reply to Curt's question.
The whole code is quite long and seat in several .inc files therefore to
copy it here is not streightforward and probably will require time for you
to get its logic.
Is that sufficient for you to guess where should I be looking for an error
and I copy here relevant bit.
 
R

Ray at

I stress that you really need to take out your On Error Resume Next
statement (or move it around to different locations as needed) whenever
you're trying to debug something.

Ray at work

I have it indeed, but next to it goes

If err.number <> 0 then
Response.write("Errors occurred while saving your form
submission.")
Else
Response.write "The Order has been saved to " & fPath &". <a
href=/data/orders/" & fName &
".xml><br/>View the Order as an XML file</a><p/>"
End If

So I understand that I should have "Errors occurred while saving your form
submission."
But I do have "The Order has been saved to" which means that err.number
 
G

Guest

I did and it made no difference

Ray at said:
I stress that you really need to take out your On Error Resume Next
statement (or move it around to different locations as needed) whenever
you're trying to debug something.

Ray at work


FileSystemObject
 
R

Ray at

In order to help with this issue, you'd have to do some of your own testing
and debugging first. You said that you lots of lines of code in this page.
Chances are that 99% of it is irrelevant to your problem here. What steps
have you taken to debug this? Have you thrown together a simple four line
asp page that creates this object and executes the save method with some
test data? You need to be able to mentally extract where the problem is and
work with that all on its own. If you have an asp page that collects form
values, does some arithmetic operations on them, inserts the results into a
database, e-mails the results to a recipient, generates a log file with the
FSO, executes a shell command, and generates a pdf and the file is not being
created by the FSO (or whatever you're using), what you'd want to do is
totally disregard all the other steps and just create a nice simple page
that runs the same FSO commands with manually entered text. I don't know
that I'm explaining this well, but it's hard to explain the steps to take to
debug something. YOu just have to sit back and think about it for a bit and
narrow down where the issue may be occurring and what the possible causes
are. You won't be able to do this if you look at 1000 lines of code and
think of it as just one step.

Ray at work
 
D

Dave Anderson

I did and it made no difference

Let me interject a comment here -- we have a server that exhibits this
behavior in *some* folders, but not others. A quick fix can be simply
creating a new folder and moving the script there. We have never devoted
much effort to determining the cause, however, as it gave us reason to move
to CDO.


--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
 
G

Guest

This makes sense, David.

I can change directories at my will as for security reasons my ISP created
only one directory with the writing permissions. So I have to stick to it.
As I mentioned, it worked OK 2 month ago.
It is possible, that the server changes its behavour in *some* folder?
Are you also saying that CDO does not cause similar problems.
 
G

Guest

Thanks, Ray.
The approach you are describing in that many words is well known as "Problem
Isolation" and of course, I have tried it while waiting comments from
colleagues in here.
CDONTS usage is well documented. I cut and pasted an example and run it
alone without any databases you mention - same result. Same about
Microsoft.XMLDOM
I do not think I need to post these examples for discussions in here, don't
I?
 

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

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top