CDONTS

Discussion in 'ASP General' started by Mac Davis, Feb 21, 2005.

  1. Mac Davis

    Mac Davis Guest

    Ive just learned that CDONTS is not available of Server 2003.
    So, I've been trying to make sense out of what I can read.
    I have succeeded in completely confusing myself.

    In one place Microsoft suggests that I can install CDONTS from Server 2000
    but it doesn't suggest where I get CDONTS.
    Other reading suggests that CDOSYS is a much better solution. Although it
    is never explicitly stated, it is implied (or at least I infer) that CDOSYS
    is installed with Server 2003.

    At activeserver.com, I found a sample script using CDOSYS.
    In the script, the following works just fine

    Set objMail = Server.CreateObject("CDO.Message")
    objMail.From = sFrom
    objMail.To = sTo
    objMail.Subject= sSubject
    objMail.TextBody = sTextBody
    objMail.HTMLBody = sHTMLBody

    which leads me to believe that the CDO object is being created properly.

    However, when I say
    objMail.send

    The page fails with a "there is a problem with this page and it cannot be
    displayed" message.

    My questions are
    1. How do I know that CDOSYS is properly installed.
    2. If CDOSYS isn't installed, how do I install it?
    3. If CDOSYS is installed, then what else could be the problem?

    Thanks folks,

    -dmd-
    If the obvious weren't so obscure, I'd be less confused.
     
    Mac Davis, Feb 21, 2005
    #1
    1. Advertising

  2. Mac Davis

    Mark Schupp Guest

    more info on cdo
    http://www.aspfaq.com/show.asp?id=2026

    see here for info about getting a usable error message
    http://www.aspfaq.com/show.asp?id=2109

    --
    --Mark Schupp
    Head of Development
    Integrity eLearning
    www.ielearning.com


    "Mac Davis" <> wrote in message
    news:...
    > Ive just learned that CDONTS is not available of Server 2003.
    > So, I've been trying to make sense out of what I can read.
    > I have succeeded in completely confusing myself.
    >
    > In one place Microsoft suggests that I can install CDONTS from Server 2000
    > but it doesn't suggest where I get CDONTS.
    > Other reading suggests that CDOSYS is a much better solution. Although it
    > is never explicitly stated, it is implied (or at least I infer) that
    > CDOSYS is installed with Server 2003.
    >
    > At activeserver.com, I found a sample script using CDOSYS.
    > In the script, the following works just fine
    >
    > Set objMail = Server.CreateObject("CDO.Message")
    > objMail.From = sFrom
    > objMail.To = sTo
    > objMail.Subject= sSubject
    > objMail.TextBody = sTextBody
    > objMail.HTMLBody = sHTMLBody
    >
    > which leads me to believe that the CDO object is being created properly.
    >
    > However, when I say
    > objMail.send
    >
    > The page fails with a "there is a problem with this page and it cannot be
    > displayed" message.
    >
    > My questions are
    > 1. How do I know that CDOSYS is properly installed.
    > 2. If CDOSYS isn't installed, how do I install it?
    > 3. If CDOSYS is installed, then what else could be the problem?
    >
    > Thanks folks,
    >
    > -dmd-
    > If the obvious weren't so obscure, I'd be less confused.
    >
     
    Mark Schupp, Feb 21, 2005
    #2
    1. Advertising

  3. Mac Davis

    Jeff Cochran Guest

    On Mon, 21 Feb 2005 09:43:19 -0500, "Mac Davis" <>
    wrote:

    >Ive just learned that CDONTS is not available of Server 2003.
    >So, I've been trying to make sense out of what I can read.
    >I have succeeded in completely confusing myself.
    >
    >In one place Microsoft suggests that I can install CDONTS from Server 2000
    >but it doesn't suggest where I get CDONTS.
    >Other reading suggests that CDOSYS is a much better solution. Although it
    >is never explicitly stated, it is implied (or at least I infer) that CDOSYS
    >is installed with Server 2003.
    >
    >At activeserver.com, I found a sample script using CDOSYS.
    >In the script, the following works just fine
    >
    >Set objMail = Server.CreateObject("CDO.Message")
    >objMail.From = sFrom
    >objMail.To = sTo
    >objMail.Subject= sSubject
    >objMail.TextBody = sTextBody
    >objMail.HTMLBody = sHTMLBody
    >
    >which leads me to believe that the CDO object is being created properly.
    >
    >However, when I say
    >objMail.send
    >
    >The page fails with a "there is a problem with this page and it cannot be
    >displayed" message.
    >
    >My questions are
    >1. How do I know that CDOSYS is properly installed.


    It installs with Server2003/IIS6

    >2. If CDOSYS isn't installed, how do I install it?


    See #1.

    >3. If CDOSYS is installed, then what else could be the problem?


    Your error isn't necessarily due to CDO.SYS not working. Do you
    receive an email when you send one? Try this script:

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

    Keep in mind you need a SMTP server you can use, that allows you to
    send through it. The SendUsing parameter in that script is set to 2
    to send using the port, and the SMTP server is specified n the
    SMTPServer parameter.

    Jeff
     
    Jeff Cochran, Feb 21, 2005
    #3
  4. Mac Davis

    Mac Davis Guest

    Thanks gentlemen. I now have it working.

    However, I haven't a clue what is happening.

    Most specifically, this segment of code mystifies me.

    sch = "http://schemas.microsoft.com/cdo/configuration/"

    Set cdoConfig = CreateObject("CDO.Configuration")

    With cdoConfig.Fields
    .Item(sch & "sendusing") = 2 ' cdoSendUsingPort
    .Item(sch & "smtpserver") = "<enter_mail.server_here>"
    .update
    End With

    Could you explain what the lines beginning with .Item are doing. I am at a
    loss as to why a URL would be included here. It seems that a couple of
    constants would fill the bill.
    Does this in some way indicate that each time I try to send mail, I have to
    connect to a Microsoft server? That makes no sense.

    I note that I can include the metadata statement in lieu of the URL but I'll
    be darned it I understand the URL.

    Thanks,

    Mac


    --

    -dmd-
    If the obvious weren't so obscure, I'd be less confused.
    "Mac Davis" <> wrote in message
    news:...
    > Ive just learned that CDONTS is not available of Server 2003.
    > So, I've been trying to make sense out of what I can read.
    > I have succeeded in completely confusing myself.
    >
    > In one place Microsoft suggests that I can install CDONTS from Server 2000
    > but it doesn't suggest where I get CDONTS.
    > Other reading suggests that CDOSYS is a much better solution. Although it
    > is never explicitly stated, it is implied (or at least I infer) that
    > CDOSYS is installed with Server 2003.
    >
    > At activeserver.com, I found a sample script using CDOSYS.
    > In the script, the following works just fine
    >
    > Set objMail = Server.CreateObject("CDO.Message")
    > objMail.From = sFrom
    > objMail.To = sTo
    > objMail.Subject= sSubject
    > objMail.TextBody = sTextBody
    > objMail.HTMLBody = sHTMLBody
    >
    > which leads me to believe that the CDO object is being created properly.
    >
    > However, when I say
    > objMail.send
    >
    > The page fails with a "there is a problem with this page and it cannot be
    > displayed" message.
    >
    > My questions are
    > 1. How do I know that CDOSYS is properly installed.
    > 2. If CDOSYS isn't installed, how do I install it?
    > 3. If CDOSYS is installed, then what else could be the problem?
    >
    > Thanks folks,
    >
    > -dmd-
    > If the obvious weren't so obscure, I'd be less confused.
    >
     
    Mac Davis, Feb 22, 2005
    #4
  5. Use parentesis on the method send:

    objMail.send()

    Hi, Fabio

    "Mac Davis" <> wrote in message
    news:...
    > Ive just learned that CDONTS is not available of Server 2003.
    > So, I've been trying to make sense out of what I can read.
    > I have succeeded in completely confusing myself.
    >
    > In one place Microsoft suggests that I can install CDONTS from Server 2000
    > but it doesn't suggest where I get CDONTS.
    > Other reading suggests that CDOSYS is a much better solution. Although it
    > is never explicitly stated, it is implied (or at least I infer) that

    CDOSYS
    > is installed with Server 2003.
    >
    > At activeserver.com, I found a sample script using CDOSYS.
    > In the script, the following works just fine
    >
    > Set objMail = Server.CreateObject("CDO.Message")
    > objMail.From = sFrom
    > objMail.To = sTo
    > objMail.Subject= sSubject
    > objMail.TextBody = sTextBody
    > objMail.HTMLBody = sHTMLBody
    >
    > which leads me to believe that the CDO object is being created properly.
    >
    > However, when I say
    > objMail.send
    >
    > The page fails with a "there is a problem with this page and it cannot be
    > displayed" message.
    >
    > My questions are
    > 1. How do I know that CDOSYS is properly installed.
    > 2. If CDOSYS isn't installed, how do I install it?
    > 3. If CDOSYS is installed, then what else could be the problem?
    >
    > Thanks folks,
    >
    > -dmd-
    > If the obvious weren't so obscure, I'd be less confused.
    >
    >
     
    Fabio Ucosich, Feb 25, 2005
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. eddie wang

    CDONTS object missing

    eddie wang, Jul 23, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    710
    Salim Afsar
    Jul 25, 2003
  2. Chris Pearson
    Replies:
    2
    Views:
    449
    Kevin Spencer
    Jul 28, 2003
  3. Paul Turley

    Sending HTML formatted mail using CDONTS

    Paul Turley, Aug 12, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    347
    Parker Zhang [MSFT]
    Aug 12, 2003
  4. Stephan

    CDONTS

    Stephan, Dec 2, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    623
    Stephan Potgieter
    Dec 2, 2003
  5. Ammar

    HELP ASP/CDONTS

    Ammar, Jun 6, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    531
    Kevin Spencer
    Jun 7, 2004
Loading...

Share This Page