SitePoint Sponsor

User Tag List

Results 1 to 23 of 23

Thread: CDONTS Problem

  1. #1
    SitePoint Enthusiast
    Join Date
    Mar 2001
    Location
    Durham, North Carolina
    Posts
    46
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    CDONTS Problem

    Whenever I use the CDONTS Object I get this error :
    HTTP 500.100 - Internal Server Error - ASP error
    Internet Information Services

    --------------------------------------------------------------------------------

    Technical Information (for support personnel)

    Error Type:
    Server object, ASP 0177 (0x800401F3)
    Invalid ProgID.
    /mail2.asp, line 30


    Browser Type:
    Mozilla/4.0 (compatible; MSIE 6.0b; Windows NT 5.1; .NET CLR 1.0.2817)

    Page:
    POST 68 bytes to /mail2.asp

    POST Data:
    T1=kl@kl.com&T2=kl@kl.com&T3=kladfsk&T4=kjlkjlkj&S1=jkljkl&B1=Submit

    Time:
    Saturday, September 01, 2001, 8:22:50 PM


    More information:
    Microsoft Support


    It just started doing this today, it didn't use to do this. This is my own server, is there a way to fix this?

  2. #2
    Say WHA?! goober's Avatar
    Join Date
    Sep 2000
    Location
    United States
    Posts
    1,921
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    WHat code are you using to send the e-mail, there could be a problem with it.

    Paste it and we'll have a looksie.
    Last edited by goober; Sep 2, 2001 at 06:01.
    Sean Killeen [LinkedIn] [Twitter] [Web]

    Warning: Reality.sys corrupted. Universe halted. Reboot? (Y/N)

  3. #3
    SitePoint Enthusiast
    Join Date
    Mar 2001
    Location
    Durham, North Carolina
    Posts
    46
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is the code for one of the scripts that I made, this script just sends out an e-mail,

    But it's doing this on all the scripts, not just this test one.
    Code:
    <%@Language=VBSCRIPT%>
    <%If Request.QueryString = "" then%>
    <form method="POST" action="mail2.asp?send">
      <p><input type="text" name="T1" size="20"> Reciver's E-mail Address</p>
      <p><input type="text" name="T2" size="20"> Sender's E-mail</p>
      <p><input type="text" name="T3" size="20"> Sender's Name</p>
      <p><input type="text" name="T4" size="20"> Message Subject&nbsp;&nbsp; </p>
      <p>&nbsp;Message Body</p>
      <p><textarea rows="4" name="S1" cols="44"></textarea></p>
      <p><input type="submit" value="Submit" name="B1"></p>
    </form>
    <% 
    else
    if request.querystring = "send" then
    
    'Connect to mail server to send e-mail message
    'Mail Sending Procedure
    'Begin Variable Declarations
    '-----------------
    dim strMessage 'Variable with message body
    dim strSender 'Variable containing sender's address
    dim strMail 'Variable containing address to mail to
    dim strSubject 'Variable containing subject line
    '-----------------
    'End Variable Declaractions
    strSubject = Request.Form("T4")  'Set The Subject
    strMail = Request.Form("T1") 'Set the Reciever Address
    strSender = Request.Form("T2") & " " & "("& Request.Form("T3") & ")" 'Set the Sender address
    strMessage = Request.Form("S1")
    	Set objNewMail = Server.CreateObject ("CDONTS.NewMail") 'Create Connection To CDONTS Mail Server
    		objNewMail.BodyFormat = 1 'Set the body format
    		objNewMail.MailFormat = 0 'Set the mail format
    		on error resume next ' Ignore Errors
    		objNewMail.Send strSender, strMail, strSubject, strMessage 'Send out the e-mail
    set objnewmail = nothing
    %>
    <B>Your e-mail has been sent</B>
    <%
    else
    end if
    		end if
    
    		%>
    Last edited by damicatz; Sep 2, 2001 at 06:51.

  4. #4
    Say WHA?! goober's Avatar
    Join Date
    Sep 2000
    Location
    United States
    Posts
    1,921
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think this is the problem.
    Code:
    if request.querystring = "send" then
    Try:
    Code:
    if request.querystring("send") <> "" then
    Perhaps another problem:
    Code:
    strSender = Request.Form("T2") & " " & "("& Request.Form("T3") & ")" 'Set the Sender address
    I don't know if CDONTS will work right with this...try just using a regular e-mail adress.

    Also, at the end, print "e-mail sent" before setting the mail object to nothing. Just a smal tip, nothing major.

    Lemme know how it works out.
    Sean Killeen [LinkedIn] [Twitter] [Web]

    Warning: Reality.sys corrupted. Universe halted. Reboot? (Y/N)

  5. #5
    SitePoint Enthusiast
    Join Date
    Mar 2001
    Location
    Durham, North Carolina
    Posts
    46
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Now it doesn't do anything I just get a blank screen when I click submit and no e-mail gets sent.

  6. #6
    SitePoint Wizard big_al's Avatar
    Join Date
    May 2000
    Location
    Victoria, Australia
    Posts
    1,661
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    Have you made sure that CDONTS.DLL is installed and registered on your machine??
    .NET Code Monkey

  7. #7
    SitePoint Enthusiast
    Join Date
    Mar 2001
    Location
    Durham, North Carolina
    Posts
    46
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Where is cdonts.dll usually located?

  8. #8
    ALT.NET - because we need it silver trophybronze trophy dhtmlgod's Avatar
    Join Date
    Jul 2001
    Location
    Scotland
    Posts
    4,836
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    it sounds like you havent installed CDONTS, simply use the find tool and plug in cdonts.dll

    but if i rememebr right, its found at c:\winNT\system\intsrv

    i think... not 100%

  9. #9
    SitePoint Enthusiast
    Join Date
    Mar 2001
    Location
    Durham, North Carolina
    Posts
    46
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok I sorta got it working, now the e-mails are taking a few hours though to get through, maybe it's just my slow e-mail account.

    The cdonts.dll wasn't in the system32 directory like it was susposed to be, seems to have disappeared after I installed Office XP :/

    Anyways I don't have the one for Windows XP server so I had to use cdonts.dll from Windows 2000.

  10. #10
    SitePoint Enthusiast hendo's Avatar
    Join Date
    Jun 2001
    Location
    Australia
    Posts
    53
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    aaarrgghhh...you never said you were using WinXP!!!



    Did they take CDO out or something? Judging by your first post CDO didn't even seem to be installed!

    What's happening here! Will we lose CDONTS under XP?

    hendo
    Steve 'Hendo' Henderson
    EnVivo!CS: Fast and Affordable Web Content Management for ASP. 100% Script, No DLLs.
    www.netsystemsco.com

  11. #11
    SitePoint Enthusiast
    Join Date
    Mar 2001
    Location
    Durham, North Carolina
    Posts
    46
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No CDONTS was there when I first installed Windows XP, but it seemed to disappear when I installed Office XP and I didn't feel like fetching the CD so I just got it from a Windows 2000 Installation on another partition.
    Last edited by damicatz; Sep 3, 2001 at 09:23.

  12. #12
    SitePoint Wizard bronze trophy
    Join Date
    Oct 2001
    Location
    Vancouver BC Canada
    Posts
    2,030
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Hey,

    I found the same problem, although the error was slightly different. Same error number but it said I have an "invalid class" and it's right at the line of code that creates the NewMail object.

    ie: Set myMail = Server.CreateObject("CDONTS.NewMail")

    I wrote a really stripped down mailing script to test it out and it will not work.

    I have installed Release Candidate 1 on the machine, and I bet it's missing the dll.

    Andrew

  13. #13
    SitePoint Wizard wdmny's Avatar
    Join Date
    Jul 2000
    Location
    Here
    Posts
    1,010
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Instead of entering in all the email message variables in one line, try doing it by setting each property individually.

    Instead of
    Code:
    objNewMail.Send strSender, strMail, strSubject, strMessage 'Send out the e-mail
    Try
    Code:
    objNewMail.From = strSender
    objNewMail.To = strMail
    objNewMail.Subject = strSubject
    objNewMail.Body = strMessage
    
    objNewMail.Send
    
    Set objNewMail = Nothing
    I don't know if that will solve your problem, but it may, and your code will be more readable.

  14. #14
    SitePoint Wizard bronze trophy
    Join Date
    Oct 2001
    Location
    Vancouver BC Canada
    Posts
    2,030
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Wes,

    Thanks for the reply....
    I think it was in regard to my question.

    The code I used is as follows:
    (Works on Win2K. This is the part that deals with email)

    Dim ObjMail
    Set ObjMail = Server.CreateObject("CDONTS.NewMail")

    objMail.From = "admin@the_domain.com"
    objMail.To = objRS("Email")
    objMail.Subject = "Username and Password"
    objMail.Body = objRS("Firstname") & "'s" & VbCrLf & "member information" & VbCrLf & VbCrLf & "Username: " & objRS("Username") & VbCrLf & "Password: " & objRS("Pass") & VbCrLf & VbCrLf & "Please keep this information in a safe place or print out this email for future Reference." & VbCrLf & "Thank You," & VbCrLf & "Admin."
    objMail.Send

    Set objMail = Nothing

    The error apears when IIS tries to deal with the Server.CreateObject(). I don't have cdonts.dll in win xp but I do have cdosys.dll. I wonder if there is a difference reqired in my code to create the mail object.

    Any ideas?
    Andrew

  15. #15
    SitePoint Wizard wdmny's Avatar
    Join Date
    Jul 2000
    Location
    Here
    Posts
    1,010
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It must be something different becuase of the new version of IIS and the whole ASP.NET thing. I would look into sites like 4guysfromrolla and check for their .NET articles.

    http://aspnet.4guysfromrolla.com/

  16. #16
    SitePoint Wizard
    Join Date
    Jan 2001
    Location
    Milton Keynes, UK
    Posts
    1,011
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The CDONTS component is meant for use on NT servers. It's also installed on Win 2000 servers for backwards compatibility. MS recommends using CDOSYS (a stripped down version of CDO written for server side processing) on Win 2000 systems. I'm guessing that MS intends CDO/CDOSYS to be used on XP systems as well, so doesn't install CDONTS on XP systems.

    You'll need to check the docs. for CDO/CDOSYS as it differs from CDONTS.

  17. #17
    SitePoint Wizard bronze trophy
    Join Date
    Oct 2001
    Location
    Vancouver BC Canada
    Posts
    2,030
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Thanks,

    I was thinking the same thing. I didn't check my Win2K box for the cdosys.dll as it's at the office, but I spent some time trying to track down cdonts in the winxp help files. (Absolutely no mention fo CDONTS)

    The cdosys mail object must have different methods than the old cdont. None of my reference material sheds any light but I'm sure it will be a bit easier now that I'm on the right track.

    Thanks for all the input,

    Andrew

  18. #18
    Say WHA?! goober's Avatar
    Join Date
    Sep 2000
    Location
    United States
    Posts
    1,921
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    CDO is also new. I believe Al mentioned something about this in another thread.

    If you'd like me to try to research the two of them, let me know. I'd be happy to.
    Sean Killeen [LinkedIn] [Twitter] [Web]

    Warning: Reality.sys corrupted. Universe halted. Reboot? (Y/N)

  19. #19
    SitePoint Wizard
    Join Date
    Jan 2001
    Location
    Milton Keynes, UK
    Posts
    1,011
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    CDO has been around for a while and CDONTS just provided a subset of CDO's functionality.

  20. #20
    Say WHA?! goober's Avatar
    Join Date
    Sep 2000
    Location
    United States
    Posts
    1,921
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, Shane. I've always been a little confused about that, as I'm sure you could see by my last post.

    Sorry if I misled anyone.
    Sean Killeen [LinkedIn] [Twitter] [Web]

    Warning: Reality.sys corrupted. Universe halted. Reboot? (Y/N)

  21. #21
    SitePoint Wizard big_al's Avatar
    Join Date
    May 2000
    Location
    Victoria, Australia
    Posts
    1,661
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    here try this thread on CDO and CDONTS http://www.sitepointforums.com/showt...&highlight=CDO
    .NET Code Monkey

  22. #22
    SitePoint Wizard bronze trophy
    Join Date
    Oct 2001
    Location
    Vancouver BC Canada
    Posts
    2,030
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Thanks Shane, Sean and Big Al.

    CDONTS Does provide a subset of CDO's functionality. The NT stands for ... well... NT as in WinNT according to the only reference material I have. The old Learn ASP in 24 Hours.

    I have a couple of other Books on ASP that don't mention anything about CDONTS so I'll probably end up having to figure out the CDOSYS methods for mail. Only for my own dvelopment stuff not for production yet.

    It isn't anything critical at the moment as most of the ASP aps I'm building are hosted on WinNT boxes anyway, but I have begun using XP on my laptop to build sites and it was really strange that I couldn't get it to run any of my mailing scripts. I thought my SMTP was configured wrong or wasn't running.

    Thanks for posting the URL to the other information I think I'll have a look.

    Again, thanks everyone.
    Andrew

  23. #23
    SitePoint Wizard bronze trophy
    Join Date
    Oct 2001
    Location
    Vancouver BC Canada
    Posts
    2,030
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Just me again.....

    I just had a look at the link you posted and found it super informative.

    Thanks again,
    Andrew


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •