VBScript Error with CDONTS

Ask a Question related to ASP, Design and Development.

  1. #1

    Default VBScript Error with CDONTS

    Hello,

    Using IIS4 on a NT4 system.... sometimesI get the following error:

    Microsoft VBScript runtime error '800a0005'
    Invalid procedure call or argument

    Here is the code:

    function UtilSendEmail(to_addr, cc_addr, from_addr, subject, body)

    UtilSendEmail=0
    Dim objCDO
    Set objCDO = CreateObject("CDONTS.NewMail")

    objCDO.To = to_addr
    objCDO.Cc = cc_addr
    objCDO.From = from_addr
    objCDO.Subject = subject
    objCDO.Body = body
    objCDO.Send

    set objCDO=Nothing

    end function


    The error always occurs on the FROM line..... any ideas?

    Thanks ahead for any help....

    Joesph Narissi
    [email]jnarissi@msn.com[/email]



    Joseph Narissi Guest

  2. Similar Questions and Discussions

    1. 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...
    2. ASP CDONTS error
      Hi, I have been building a shopping cart & the final page will email the order to an address given however I get the following error message using...
    3. CDONTS Problem - no error msg
      I verified that CDONTS and SMTP are supported by the server. I do not receive an error message when I open the following ASP page nor do I receive...
    4. error '8007045a' when executing CDONTS
      How can I get text description of the error? This is ASP application, not .NET application. Thanks. *** Sent via Developersdex...
    5. error '8007045a' when executing CDONTS
      I have the following sample code to send email from a form via CDONTS. I got error '8007045a' when executing the ASP page. Please help. THanks. ...
  3. #2

    Default Re: VBScript Error with CDONTS

    I don't see the problem, but try using CDO.Message instead... CDONTS is
    deprecated.



    "Joseph Narissi" <jnarissi@anchor-computer.com> wrote in message
    news:eA2gGVicDHA.1748@TK2MSFTNGP12.phx.gbl...
    > Hello,
    >
    > Using IIS4 on a NT4 system.... sometimesI get the following error:
    >
    > Microsoft VBScript runtime error '800a0005'
    > Invalid procedure call or argument
    >
    > Here is the code:
    >
    > function UtilSendEmail(to_addr, cc_addr, from_addr, subject, body)
    >
    > UtilSendEmail=0
    > Dim objCDO
    > Set objCDO = CreateObject("CDONTS.NewMail")
    >
    > objCDO.To = to_addr
    > objCDO.Cc = cc_addr
    > objCDO.From = from_addr
    > objCDO.Subject = subject
    > objCDO.Body = body
    > objCDO.Send
    >
    > set objCDO=Nothing
    >
    > end function
    >
    >
    > The error always occurs on the FROM line..... any ideas?
    >
    > Thanks ahead for any help....
    >
    > Joesph Narissi
    > [email]jnarissi@msn.com[/email]
    >
    >
    >

    Aaron Bertrand - MVP Guest

  4. #3

    Default Re: VBScript Error with CDONTS

    Isnt CDO only available for Win2K+? We are using NT4... does thi smatter?

    "Aaron Bertrand - MVP" <aaron@TRASHaspfaq.com> wrote in message
    news:eG8tZgicDHA.1748@TK2MSFTNGP12.phx.gbl...
    > I don't see the problem, but try using CDO.Message instead... CDONTS is
    > deprecated.
    >
    >
    >
    > "Joseph Narissi" <jnarissi@anchor-computer.com> wrote in message
    > news:eA2gGVicDHA.1748@TK2MSFTNGP12.phx.gbl...
    > > Hello,
    > >
    > > Using IIS4 on a NT4 system.... sometimesI get the following error:
    > >
    > > Microsoft VBScript runtime error '800a0005'
    > > Invalid procedure call or argument
    > >
    > > Here is the code:
    > >
    > > function UtilSendEmail(to_addr, cc_addr, from_addr, subject, body)
    > >
    > > UtilSendEmail=0
    > > Dim objCDO
    > > Set objCDO = CreateObject("CDONTS.NewMail")
    > >
    > > objCDO.To = to_addr
    > > objCDO.Cc = cc_addr
    > > objCDO.From = from_addr
    > > objCDO.Subject = subject
    > > objCDO.Body = body
    > > objCDO.Send
    > >
    > > set objCDO=Nothing
    > >
    > > end function
    > >
    > >
    > > The error always occurs on the FROM line..... any ideas?
    > >
    > > Thanks ahead for any help....
    > >
    > > Joesph Narissi
    > > [email]jnarissi@msn.com[/email]
    > >
    > >
    > >
    >
    >

    Joseph Narissi Guest

  5. #4

    Default Re: VBScript Error with CDONTS

    > Isnt CDO only available for Win2K+?

    Yes. CDONTS is still deprecated, so your code will stop working when you
    finally decide to ditch NT. How about using one of the other dozens of mail
    objects available? [url]http://www.aspfaq.com/2119[/url]


    Aaron Bertrand - MVP Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139