Home | Advertising Info3 USERS CURRENTLY ONLINE   
PowerASP
   Site Search Contact Us Thursday, April 18, 2024  

  Active InfoActive Info  Display List of Info MembersMemberlist  Search The InfoSearch  HelpHelp
  RegisterRegister  LoginLogin
Classic ASP - General
 PowerASP Code Help Area : Classic ASP - General
Subject Info: cdonts A d d  -  P o s tAdd P o s t
Author
Message << Prev Info | Next Info >>
Xroads
Newbie
Newbie


Joined: June/28/2006
Online Status: Offline
Info: 1
Added: 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 info by Xroads
 
afifm
Newbie
Newbie


Joined: July/02/2006
Online Status: Offline
Info: 1
Added: 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 info by afifm
 

If you wish to make a comment to this info you must first login
If you are not already registered you must first register

  A d d  -  P o s tAdd P o s t
Printable version Printable version

Info Jump
You cannot add new info in this area
You cannot add to info in this area
You cannot delete your info in this area
You cannot edit your info in this area
You cannot create polls in this area
You cannot vote in polls in this area

   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.

vbscript active server pages ASP vbscript SQL database informix oracle SQL Server Perl CGI Delphi PHP source code code sample samples program CJWSoft ASPProtect ASPBanner ASPClassifieds www.aspprotect.com, www.cjwsoft.com,www.aspclassifieds.com,www.aspphotogallery.com