CDONTS error - too much data?

Ask a Question related to ASP Components, Design and Development.

  1. #1

    Default 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
    ----------------------------






    Griff Guest

  2. Similar Questions and Discussions

    1. 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...
    2. VBScript Error with CDONTS
      Hello, Using IIS4 on a NT4 system.... sometimesI get the following error: Microsoft VBScript runtime error '800a0005' Invalid procedure call...
    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: CDONTS error - too much data?

    Ditch CDONTS and switch to CDO.

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

    --
    Regards

    Steven Burn
    Ur I.T. Mate Group
    [url]www.it-mate.co.uk[/url]

    Keeping it FREE!

    "Griff" <Howling@The.Moon> wrote in message
    news:es#uKzdxFHA.2924@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
    > ----------------------------
    >
    >
    >
    >
    >
    >

    Steven Burn Guest

  4. #3

    Default Re: CDONTS error - too much data?

    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 :-(


    Griff Guest

  5. #4

    Default Re: CDONTS error - too much data?

    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
    [url]www.it-mate.co.uk[/url]

    Keeping it FREE!

    "Griff" <Howling@The.Moon> wrote in message
    news:OSLTXGexFHA.904@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 :-(
    >
    >

    Steven Burn Guest

  6. #5

    Default Re: CDONTS error - too much data?

    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;

    [url]www.argosoft.com[/url]

    --
    Regards

    Steven Burn
    Ur I.T. Mate Group
    [url]www.it-mate.co.uk[/url]

    Keeping it FREE!

    "Griff" <Howling@The.Moon> wrote in message
    news:OSLTXGexFHA.904@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 :-(
    >
    >

    Steven Burn Guest

  7. #6

    Default Re: CDONTS error - too much data?

    Fantastic help - thanks Steven


    Griff Guest

  8. #7

    Default Re: CDONTS error - too much data?

    The example given on:
    [url]http://www.w3schools.com/asp/asp_send_email.asp[/url]

    Just shows the code required as:
    <%
    Set myMail=CreateObject("CDO.Message")
    myMail.Subject="Sending email with CDO"
    myMail.From="mymail@mydomain.com"
    myMail.To="someone@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


    Griff Guest

  9. #8

    Default Re: CDONTS error - too much data?

    Yup - that seems to work fine for my needs.


    Griff 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