Home | Advertising Info2 USERS CURRENTLY ONLINE   
PowerASP
   Site Search Contact Us Friday, May 10, 2024  

  Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
Classic ASP - General
 PowerASP Code Help Area : Classic ASP - General
Subject Topic: cdonts Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
Xroads
Newbie
Newbie


Joined: June/28/2006
Online Status: Offline
Posts: 1
Posted: June/28/2006 at 12:32pm | IP Logged Quote Xroads

Hi

Im having problems with cdonts as the new 2003 server wont accept them, below is some code using cdonts can someone advise me what to put in to convert it to cdosys. Greatly appreciate your help

%@LANGUAGE="VBscript" %>
<% Response.Buffer = True %>
<html>
<%


 Set oConn = Server.CreateObject("ADODB.Connection")
 Set oRs = Server.CreateObject("ADODB.RecordSet")

 Set oRs= Server.CreateObject("ADODB.RecordSet")
 oConn.Open "DBQ=" & Server.Mappath(" ")   & ";Driver={Microsoft Access Driver (*.mdb)};"

dealer = UCASE(request.form("dealer"))
password = UCASE(request.form("password"))
contact = request.form("contact")
phone = request.form("phone")
fax = request.form("fax")
emailadd = request.form("emailadd")

 Set oConn = Server.CreateObject("ADODB.Connection")
 Set oRs = Server.CreateObject("ADODB.RecordSet")
 Set omail = Server.CreateObject("ADODB.RecordSet")
 oConn.Open "DBQ=" & Server.Mappath("/databases/dawn.mdb")   & ";Driver={Microsoft Access Driver (*.mdb)};"


sql2 = "insert into signup(dealer, contact, phone, fax, email, password) values ('"& dealer &"','"& contact &"','"& phone &"','"& fax &"','"& emailadd &"','"& password &"')"
set oRs = oConn.execute(sql2)

'******************************

sql3 = "select * from signup where email = '"& emailadd &"'"
set omail = oConn.execute(sql3)
'response.write(dealer)

'sets variables
email = omail("email")
   'chooses username and password from database that correspond
   'to submitted email address.
user = omail("dealer")
tel = omail("phone")
contact = omail("contact")
Set sendmail = Server.CreateObject("CDONTS.NewMail")

   'put the webmaster address here
sendmail.From = email

   'The mail is sent to the address entered in the previous page.
sendmail.To = " "

   'Enter the subject of your mail here
sendmail.Subject = "New Vendor Request"

   'This is the content of thr message.
sendmail.Body = "The following Vendor has requested signup: " &_
                 vbCrlf & vbCrlf & "Company: " & user & _
                vbCrlf & "Contact: " & contact & _
                vbCrlf & "Telephone No: " & tel & vbCrlf

   'this sets mail priority.... 0=low 1=normal 2=high
sendmail.Importance = 2

sendmail.Send     'Send the email!
Set sendmail = Nothing
    response.redirect "doneit.asp"
%>
</html>

Back to Top View Xroads's Profile Search for other posts by Xroads
 
afifm
Newbie
Newbie


Joined: July/02/2006
Online Status: Offline
Posts: 1
Posted: July/02/2006 at 8:51pm | IP Logged Quote afifm

OLD: Set sendmail = Server.CreateObject("CDONTS.NewMail")

New: Set sendmail = Server.CreateObject("CDO.Message")

OLD: sendmail.Body

New:  sendmail.HTMLBody

OR: sendmail.TextBody

Back to Top View afifm's Profile Search for other posts by afifm
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum

   Active Server Pages Rule The World
Contact Us  
All artwork, design & content contained in this site are Copyright © 1998 - 2024 PowerASP.com and Christopher J. Williams
Banner ads ,other site logos, etc are copyright of their respective companies.
STATS Unless otherwise noted - All Rights Reserved.

Active Server Pages ASP ASP.NET .aspx .ascx Web HTML Developer Internet Microsoft Web Services Visual Studio .NET CJWSoft ASPProtect ASPBanner ASPClassifieds www.aspprotect.com, www.cjwsoft.com,www.aspclassifieds.com,www.aspphotogallery.com