Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2004
    Posts
    3

    Unanswered: CDONTS not functionaing

    Hi,
    I have a little trouble here. This script was working all fine with my previous host, and when i switched the host, i coppied all the files from the previous one to the present one. The whole dating site is working fine, except the register.asp page. It is not responding, i think, it is due to CDONTS. Here is the code. Can anybody plz tell what changes do i need to make. My host told me, i do have CDONTS, but i dont know what to do. I am a newbie in this field:
    -----------
    -----------
    end if
    Session.Abandon

    Set Conn = Server.CreateObject("ADODB.Connection")
    Conn.Open MM_conn_STRING
    sql1 = "insert into p_users (p_user,p_password,p_state,p_first,p_last,p_email, p_phone,p_fax,p_address,p_city,p_zip,p_newsletter, p_ip) values('"& sqlsafe(textfield) & "','"& sqlsafe(textfield2) & "','"& textfield3 & "','"& sqlsafe(textfield4) & "','"& sqlsafe(textfield5) & "','"& sqlsafe(textfield6) & "','"& sqlsafe(textfield7) & "','"& sqlsafe(textfield8) & "','"& sqlsafe(textfield9) & "','"& sqlsafe(textfield10) & "','"& sqlsafe(textfield11) & "','"& checkbox & "','"& sqlsafe(ipaddy) & "')"
    conn.execute(sql1)

    SQL1 = "SELECT p_id FROM p_users WHERE p_user = '" + Replace(textfield, "'", "''") + "'"
    Set rsReg = conn.execute(sql1)
    p_id = rsReg("p_id")

    Dim objCDO
    Set objCDO = Server.CreateObject("CDONTS.NewMail")
    body = "Hello " & textfield4 & (" ") & textfield5 & vbCrLf & vbCrLf
    body = body & "Your username is: " & textfield & vbCrLf
    body = body & "Your password is: " & textfield2 & vbCrLf & vbCrLf
    body = body & "Your activation number is: " & p_id & vbCrLf & vbCrLf
    body = body & "You have a minimum of 24 hours to activate your account or the registration will be removed. Please use the link below to activate your account. " & vbCrLf & vbCrLf
    body = body & weburl & "activate.asp?activate=" & p_id & vbCrLf

    objCDO.To = textfield6
    objCDO.From = websitename & " < " & webemail & (" >")
    objCDO.Subject = "Activate your Personals Account!"
    objCDO.Body = body
    objCDO.Send()
    Set objCDO = Nothing

    ------------
    -----------

  2. #2
    Join Date
    Jun 2003
    Location
    USA
    Posts
    1,032
    CDO is generally used instead of CDONTS on IIS 5 and after (actually the SMTP service within IIS) which is generally on servers after Win NT4 (although I think CDONTS is generally still supported too).

    Here are changes I made to convert CDONTS stuff to be CDO stuff instead:

    o Change objCDONTS to be called objCDO (actually this is just a cosmetic change)

    o This:
    Set objCDONTS = Server.CreateObject("CDONTS.NewMail")

    Changed to this instead:
    Set objCDO = Server.CreateObject("CDO.Message")

    o This:
    objCDONTS.Body = strEmailBody

    Changed to this instead:
    objCDO.TextBody = strEmailBody

    o This removed:
    ' Importance.
    ' (0=Low, 1=Normal, 2=High)
    objCDONTS.Importance = 1
    J. Paul Schmidt, Freelance Web and Database Developer
    www.Bullschmidt.com
    Access Database Sample, Web Database Sample, ASP Design Tips

  3. #3
    Join Date
    Apr 2004
    Posts
    3

    hmmm, still not working

    OKAY, I have changed every CDONTS thingy to CDO.Message. Still the same internal server error.....!

  4. #4
    Join Date
    Apr 2004
    Posts
    3

    I got it.....!

    Hey hey hey....i got it.....Thankyou soooo much
    May God bless you
    Mohammad

Posting Permissions

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