CDONTS Problem - no error msg

Ask a Question related to ASP, Design and Development.

  1. #1

    Default 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 an email. I used response.write to verify that it creates a
    recordset. As always, any help is appreciated. Code is as follows:

    <!-- #INCLUDE FILE="adovbs.inc" -->
    <%

    Dim objNewMail ' Our CDO object
    Dim strTo ' Strings to hold our email fields
    Dim strFrom
    Dim strSubject
    Dim strBody
    Dim objConn


    strFrom = "fromaddress@here.com"
    strSubject = "!! Alert: Resource Brokering Request Expiration !!"

    Set objConn = Server.CreateObject("ADODB.Connection")
    objConn.ConnectionTimeout = 15
    objConn.CommandTimeout = 30

    Dim strConnString

    strConnString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & _
    Server.MapPath("includes\database.mdb") & ";"
    strSQL = "SELECT RECRUITER_EMAIL, JOB_FILE_NBR FROM RB_REQUEST WHERE
    EXPIR_DT=#" & Date()+1 & "#"


    Set rs = Server.CreateObject("ADODB.Recordset")
    rs.Open strSQL, strConnString, adOpenKeyset, adLockPessimistic,
    adCmdText



    Do While Not RS.EOF
    strTo = RS.Fields("RECRUITER_EMAIL")
    strJob = RS.Fields("JOB_FILE_NBR")

    strBody = "The Resource Brokering Request for Job File Number " &
    strJob & vbCrLf _
    & " will expire in 24 hours. Please extend the expiration date for
    this request if necessary."


    Set objNewMail = Server.CreateObject("CDONTS.NewMail")
    objNewMail.From = strFrom
    objNewMail.To = strTo
    objNewMail.Subject = strSubject
    objNewMail.Body = strBody
    'objCDO.Send
    Set objNewMail = Nothing


    RS.MoveNext
    Loop

    %>
    Janet 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. VBScript Error with CDONTS
      Hello, Using IIS4 on a NT4 system.... sometimesI get the following error: Microsoft VBScript runtime error '800a0005' Invalid procedure call...
    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 Problem - no error msg

    Two things I see right at a glance.

    1. You have your send command commented out.
    2. If you were to uncomment that command, you'd be trying to send objCDO
    instead of objNewMail.

    Ray at work

    "Janet" <jcasid01@sprintspectrum.com> wrote in message
    news:9a828fd7.0307301227.7c9936ba@posting.google.c om...
    > Set objNewMail = Server.CreateObject("CDONTS.NewMail")
    > objNewMail.From = strFrom
    > objNewMail.To = strTo
    > objNewMail.Subject = strSubject
    > objNewMail.Body = strBody
    > 'objCDO.Send
    > Set objNewMail = Nothing
    >
    >
    > RS.MoveNext
    > Loop
    >
    > %>

    Ray at Guest

  4. #3

    Default Re: CDONTS Problem - no error msg

    Try this page first.

    <%
    Set objEmail = CreateObject("CDO.Message")
    objEmail.From = "somemail@somewhere.com"
    objEmail.To = "<your email address>"
    objEmail.Subject = "cdotest"
    objEmail.HTMLbody = Test
    objEmail.Send
    %>


    "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
    news:%237KgHntVDHA.1748@TK2MSFTNGP12.phx.gbl...
    > Two things I see right at a glance.
    >
    > 1. You have your send command commented out.
    > 2. If you were to uncomment that command, you'd be trying to send objCDO
    > instead of objNewMail.
    >
    > Ray at work
    >
    > "Janet" <jcasid01@sprintspectrum.com> wrote in message
    > news:9a828fd7.0307301227.7c9936ba@posting.google.c om...
    >
    > > Set objNewMail = Server.CreateObject("CDONTS.NewMail")
    > > objNewMail.From = strFrom
    > > objNewMail.To = strTo
    > > objNewMail.Subject = strSubject
    > > objNewMail.Body = strBody
    > > 'objCDO.Send
    > > Set objNewMail = Nothing
    > >
    > >
    > > RS.MoveNext
    > > Loop
    > >
    > > %>
    >
    >

    Mike 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