I hope that you also receive responses from some people on this list that have 
more experience with ASP and VBScript than I do -- but since it is late at 
night, you might not get very many responses until tomorrow. So, I thought I 
would just give you my first thought, which is: are you sure that the CDONTS 
component has been registered on your server? The error message that you're 
getting seems like the kind of error message that you would get if the 
component was not registered.

- Cynthia Leslie 
  ----- Original Message ----- 
  From: broodmdh 
  To: [email protected] 
  Sent: Monday, December 20, 2004 9:28 PM
  Subject: [AspClassicAnyQuestionIsOk] Email form troubles




  I am totally new to asp, but not to programming.  I am setting up a 
  site on the doteasy network, but I cannot get my email form to 
  work.  I will include both the html and asp code below.  The error I 
  receive is as follows:  

  Server object error 'ASP 0177 : 800401f3' 
  Server.CreateObject Failed 
  /emailForm.asp, line 34 
  800401f3 

  Line 34 is as follows:

  Set objCDOMail = Server.CreateObject("CDONTS.NewMail")

  To me, this means that CDONTS is not installed on this server.  Is 
  this the case?  How do I diagnose the problem?  Any help would be 
  greatly appreciated.



  This is the html code:

  <FORM ACTION="emailForm.asp" METHOD="post">
  Name:<br>
  <INPUT NAME="_recepients" TYPE="hidden" VALUE="[EMAIL PROTECTED]"/>
  <INPUT NAME="_requiredFields" type="hidden"
    value="emailName,emailAddress,emailSubject,emailBody" />
  <INPUT TYPE="text" NAME="emailName" SIZE="30"></INPUT><br>
  E-mail address:<br>
  <INPUT TYPE="text" NAME="emailAddress" SIZE="30"></INPUT><br>
  Subject:<br>
  <INPUT TYPE="text" NAME="emailSubject" 
  SIZE="30"></INPUT><br>                
  Message: <br>
  <TEXTAREA NAME="emailBody" ROWS="10" COLS="40" 
  WRAP="virtual"></TEXTAREA><BR>
  <INPUT TYPE="submit" VALUE="Send Mail!"></INPUT>
  </FORM>


  The asp file is as follows:


  <%@ Language=VBScript %>
  <HTML>
  <HEAD>
  <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
  </HEAD>
  <BODY>
  <%
  dim strName, strEmail, strSubject, strBody
  dim jobCDOMail

  strName = Request.Form("emailName")
  strEmail = Request.Form("emailAddress")
  response.write(strEmail)
  strSubject = Request.Form("emailSubject")
  strBody = Request.Form("emailBody")

  strBody = strBody & vbCrlf & vbCrlf

  if strEmail = "" or not IsValidEmail(strEmail) then
        %>
        <FORM ACTION="/emailForm.asp" METHOD="post">
              Name:<br>
              <INPUT TYPE="text" NAME="emailName" 
  SIZE="30"></INPUT><br>
          E-mail address:<br>
          <INPUT TYPE="text" NAME="emailAddress" SIZE="30"></INPUT><br>
          Subject:<br>
          <INPUT TYPE="text" NAME="emailSubject" 
  SIZE="30"></INPUT><br>                
          Message: <br>
          <TEXTAREA NAME="emailBody" ROWS="10" COLS="40" 
  WRAP="virtual"></TEXTAREA><BR>
          <INPUT TYPE="submit" VALUE="Send Mail!"></INPUT>
              </FORM>
        <%
  else
        Set objCDOMail = Server.CreateObject("CDONTS.NewMail")
        objCDOMail.Name = strName
        objCDOMail.From = strEmail
        objCDOMail.To = "[EMAIL PROTECTED]"
        objCDOMail.Subject = strSubject
        objCDOMail.Body = strBody
        objCDOMail.MailFormat = 0
        
        objCDOMail.Send
        
        Set objCDOMail = Nothing
        
        Response.Write "Email Sent Successfully. Thank you for your 
  input."
  end if
  %>

  <% 
  Function IsValidEmail(strEmail)
        Dim bIsValid
        bIsValid = True
        
        If Len(strEmail) < 5 Then
              bIsValid = False
        Else
              If Instr(1, strEmail, " ") <> 0 Then
                    bIsValid = False
              Else
                    If InStr(1, strEmail, "@", 1) < 2 Then
                          bIsValid = False
                    Else
                          If InStrRev(strEmail, ".") < InStr
  (1, strEmail, "@", 1) + 2 Then
                                bIsValid = False
                          End If
                    End If
              End If
        End If

        IsValidEmail = bIsValid
  End Function
  %>
  </BODY>
  </HTML>









        Yahoo! Groups Sponsor 
              ADVERTISEMENT
             
       
       


------------------------------------------------------------------------------
  Yahoo! Groups Links

    a.. To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/
      
    b.. To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]
      
    c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 



[Non-text portions of this message have been removed]



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to