5 Replies Latest reply on Jul 18, 2008 3:47 PM by bregent

    CDO Form mailer: Using Verio's instructions

    bkrboy@chartermi.net
      I used verios instructions to create a code as I was instructed.

      I get this error message:
      Microsoft VBScript compilation error '800a0401'

      Expected end of statement

      /index_files/emailer.asp, line 26

      Dim Flds Const cdoSendUsingPort = 2
      ---------^

      This is my entire code:

      <!--METADATA TYPE="typelib" UUID="CD000000-8B95-11D1-82DB-00C04FB1625D" NAME="CDO for Windows Library" -->

      <!--METADATA TYPE="typelib" UUID="00000205-0000-0010-8000-00AA006D2EA4" NAME="ADODB Type Library" -->

      <%
      DIM objCDO
      Set objCDO = Server.Createobject("CDO.Message")
      %>

      <% Set objCDO = Nothing %>

      <%
      myMail.From = "info@walkwithhim.org"
      myMail.To = "bkrboy@chartermi.net"
      myMail.Subject = "Story"
      myMail.TextBody = "Here is a story from the website"
      myMail.Send
      %>

      <%
      Dim objConf
      Set objConf = Server.CreateObject("CDO.Configuration")
      %>

      <%
      Dim Flds Const cdoSendUsingPort = 2
      Set Flds = iConf.Fields
      With Flds
      .Item(cdoSendUsingMethod) = cdoSendUsingPort
      .Item(cdoSMTPServer) = "mail-fwd"
      .Item(cdoSMTPServerPort) = 25
      .Item(cdoSMTPconnectiontimeout) = 10
      .Update
      End With
      %>







      http://www.verio.com/support/documents/view_article.cfm?doc_id=3894

      I got the instructions from the page above:


      Can you look at my code and see if there is any errors?


      Thanks SO much!
        • 1. Re: CDO Form mailer: Using Verio's instructions
          Level 7
          Try putting this on 2 lines:

          Dim Flds Const cdoSendUsingPort = 2

          Like this:

          Dim Flds
          Const cdoSendUsingPort = 2

          --
          Ken Ford
          Adobe Community Expert - Dreamweaver/ColdFusion
          Fordwebs, LLC
          http://www.fordwebs.com


          "bkrboy@chartermi.net" <webforumsuser@macromedia.com> wrote in message news:g5oe7c$jl3$1@forums.macromedia.com...
          >I used verios instructions to create a code as I was instructed.
          >
          > I get this error message:
          > Microsoft VBScript compilation error '800a0401'
          >
          > Expected end of statement
          >
          > /index_files/emailer.asp, line 26
          >
          > Dim Flds Const cdoSendUsingPort = 2
          > ---------^
          >
          > This is my entire code:
          >
          > <!--METADATA TYPE="typelib" UUID="CD000000-8B95-11D1-82DB-00C04FB1625D"
          > NAME="CDO for Windows Library" -->
          >
          > <!--METADATA TYPE="typelib" UUID="00000205-0000-0010-8000-00AA006D2EA4"
          > NAME="ADODB Type Library" -->
          >
          > <%
          > DIM objCDO
          > Set objCDO = Server.Createobject("CDO.Message")
          > %>
          >
          > <% Set objCDO = Nothing %>
          >
          > <%
          > myMail.From = "info@walkwithhim.org"
          > myMail.To = "bkrboy@chartermi.net"
          > myMail.Subject = "Story"
          > myMail.TextBody = "Here is a story from the website"
          > myMail.Send
          > %>
          >
          > <%
          > Dim objConf
          > Set objConf = Server.CreateObject("CDO.Configuration")
          > %>
          >
          > <%
          > Dim Flds Const cdoSendUsingPort = 2
          > Set Flds = iConf.Fields
          > With Flds
          > .Item(cdoSendUsingMethod) = cdoSendUsingPort
          > .Item(cdoSMTPServer) = "mail-fwd"
          > .Item(cdoSMTPServerPort) = 25
          > .Item(cdoSMTPconnectiontimeout) = 10
          > .Update
          > End With
          > %>
          >
          >
          >
          >
          >
          >
          >
          > http://www.verio.com/support/documents/view_article.cfm?doc_id=3894
          >
          > I got the instructions from the page above:
          >
          >
          > Can you look at my code and see if there is any errors?
          >
          >
          > Thanks SO much!
          >
          >
          • 2. Re: CDO Form mailer: Using Verio's instructions
            bkrboy@chartermi.net Level 1
            I don't understand. Do i add this or where do i put it?
            • 3. Re: CDO Form mailer: Using Verio's instructions
              Level 7
              Right now you have this:

              <%
              Dim Flds Const cdoSendUsingPort = 2
              Set Flds = iConf.Fields
              With Flds
              .Item(cdoSendUsingMethod) = cdoSendUsingPort
              .Item(cdoSMTPServer) = "mail-fwd"
              .Item(cdoSMTPServerPort) = 25
              .Item(cdoSMTPconnectiontimeout) = 10
              .Update
              End With
              %>

              Try changing it to this:

              <%
              Dim Flds
              Const cdoSendUsingPort = 2
              Set Flds = iConf.Fields
              With Flds
              .Item(cdoSendUsingMethod) = cdoSendUsingPort
              .Item(cdoSMTPServer) = "mail-fwd"
              .Item(cdoSMTPServerPort) = 25
              .Item(cdoSMTPconnectiontimeout) = 10
              .Update
              End With
              %>



              --
              Ken Ford
              Adobe Community Expert - Dreamweaver/ColdFusion
              Fordwebs, LLC
              http://www.fordwebs.com


              "bkrboy@chartermi.net" <webforumsuser@macromedia.com> wrote in message news:g5qaop$mk1$1@forums.macromedia.com...
              >I don't understand. Do i add this or where do i put it?
              • 4. Re: CDO Form mailer: Using Verio's instructions
                Ms. Casey
                Can I copy this code to send the form data to a database? Or is that a different code?

                Thanks
                Casey
                • 5. Re: CDO Form mailer: Using Verio's instructions
                  bregent Most Valuable Participant
                  >Can I copy this code to send the form data to a database? Or is that a different code?

                  It's completely different code. The OP is trying to send mail from a form.