Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2002
    Location
    KY
    Posts
    56

    Unanswered: MailFormat - Server.CreateObject Failed

    Can anybody tell me why I'm getting this error:
    Server.CreateObject Failed
    The error is taking place @

    Dim mailObj
    Set mailObj = Server.CreateObject("CDONTS.NewMail")
    With mailObj
    .From = strFrom
    .To = strTo
    .Subject = strSubject
    .Body = strBody
    .Send
    End With

    Set mailObj=nothing

    here's the complete code, besides the HTML that I cut out.
    <%
    strFrom = Request.Form("from")

    strTo = "somebody@hotmail.com"

    strSubject = "Licensing Problem!"

    strBody = "This problem has been submitted on " & Now() & "." & vbCrLF & vbCrLF

    strBody = strBody & "Name: " & Request.Form("name") & " (Phone Num. " & Request.Form("phone_num") & ")" & vbCrLF & vbCrLF

    strBody = strBody & "Issue/Problem: " & vbCrLf & Request.Form("problem") & vbCrLF

    'New Code
    Dim mailObj
    Set mailObj = Server.CreateObject("CDONTS.NewMail")
    With mailObj
    .From = strFrom
    .To = strTo
    .Subject = strSubject
    .Body = strBody
    .Send
    End With

    Set mailObj=nothing

    %>

  2. #2
    Join Date
    Jun 2003
    Location
    USA
    Posts
    1,032
    You might try switching from CDONTS (which is being phased out) to the newer CDO such as can be seen in the E-mail Attachment example at http://www.asp101.com/samples
    J. Paul Schmidt, Freelance Web and Database Developer
    www.Bullschmidt.com
    Access Database Sample, Web Database Sample, ASP Design Tips

  3. #3
    Join Date
    Aug 2003
    Location
    Kayseri-Turkiye
    Posts
    7
    CDONTS component may be uninstalled, or you may be using an operationg system that does not support CDONTS because CDONTS is Collobrated Data Objects for WINDOWS NT. This means that you cannot use it on an Win 9x system.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •