If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > CDONTS not functionaing

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-20-04, 03:08
bholabhala bholabhala is offline
Registered User
 
Join Date: Apr 2004
Posts: 3
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

------------
-----------
Reply With Quote
  #2 (permalink)  
Old 04-20-04, 04:04
Bullschmidt Bullschmidt is offline
Guru
 
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
Reply With Quote
  #3 (permalink)  
Old 04-20-04, 05:00
bholabhala bholabhala is offline
Registered User
 
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.....!
Reply With Quote
  #4 (permalink)  
Old 04-20-04, 05:05
bholabhala bholabhala is offline
Registered User
 
Join Date: Apr 2004
Posts: 3
I got it.....!

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

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On