0 Replies Latest reply on Jul 18, 2008 8:04 AM by bkrboy@chartermi.net

    CDO Form Mailer Code:

    bkrboy@chartermi.net
      This is my CDO Code I made with the instructions from verio hosting. When i click submit on my form it just goes to a blank white screen.

      I don't think it's sending it. Do you see any problems?


      Also, what kind of file do i use? an ASP or??? Then i do form action= correct?



      <!--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" -->
      <%
      SUB sendmail( fromWho, toWho, Subject, Body )
      Dim objCDO
      Dim iConf
      Dim Flds

      Const cdoSendUsingPort = 2

      Set objCDO = Server.CreateObject("CDO.Message")
      Set iConf = Server.CreateObject("CDO.Configuration")

      Set Flds = iConf.Fields
      With Flds
      .Item(cdoSendUsingMethod) = cdoSendUsingPort
      .Item(cdoSMTPServer) = "mail-fwd"
      .Item(cdoSMTPServerPort) = 25
      .Item(cdoSMTPconnectiontimeout) = 10
      .Update
      End With

      Set objCDO.Configuration = iConf

      objCDO.From = fromWho
      objCDO.To = toWho
      objCDO.Subject = Subject
      objCDO.TextBody = Body
      objCDO.Send

      END SUB
      fromWho = TRIM( Request.Form( "info@walkingwithhim.org") )
      toWho = TRIM( Request.Form( "bkrboy@chartermi.net") )
      Subject = TRIM( Request.Form( "Story" ) )
      Body = TRIM( Request.Form( "Body") )
      If toWho <> "" THEN
      sendMail fromWho, toWho, Subject, Body


      'Cleanup
      Set ObjCDO = Nothing
      Set iConf = Nothing
      Set Flds = Nothing
      Response.redirect "Page359.html"
      ' Any existing page can be used for the response redirect method
      END IF
      %>


      Thanks so much.