Forum     

Go Back   Digit Technology Discussion Forum > Portables, Peripherals and Electronics > QnA (read only)
Register FAQ Calendar Mark Forums Read

QnA (read only) Mods please help transfer the contents of this forum to proper sections. :)


 
 
LinkBack Thread Tools Search this Thread Display Modes
Old 01-10-2004, 12:39 AM   #1 (permalink)
Right Off the Assembly Line
 
Join Date: Jul 2004
Posts: 18
Default help for asp


hi im useing windows xp
but xp and win 2003 server does not support collaboration Data objects for windows NT server (CDONTS)
is any way that i can use CDONTS on xp

and how i can use following code on windows xp and windows 2003 server

please tell me where i can modify for
windows xp - CDOSYS
windows 2003 server - CDO
in code

<%@ LANGUAGE="VBSCRIPT" %>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft FrontPage 5.0">
<META HTTP-EQUIV="Content-Type" content="text/html; charset=iso-8859-1">

</HEAD>
<BODY>

<HTML>
<HEAD>
<TITLE>Feedback</TITLE>
</HEAD>

<BODY bgCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" vLINK="#0000AA" aLINK="#000000">

<%

' The location of the text file containing the data for
' the auto-response message.
Filename = "<please insert the path>\auto_response.txt"

' This script checks for information in required
' form variables, trims the spaces from the information
' that was entered, sends the feedback message,
' and sends the visitor an auto-response message
' that is read from a text file.


' Retrieve the information the user entered and
' store it in variables.
reqName = Trim(Request.Form("Name"))
reqEMail = Trim(Request.Form("EMail"))
reqMessage = Trim(Request.Form("Message"))


' Check for required information and provide
' the visitor with an error message if a required
' field was left blank.
If reqName = "" OR reqEMail = "" OR reqMessage = "" Then
' Not all required information was
' entered. Provide the visitor with an error
' message
%>
<font color="#FF0000">
Error!</font>



You must enter information for all of the required
fields.
<%
Else
' Sufficient information was entered.
'
' Proceed.


' Provide ASPEMail with the information it needs
' to send the feedback message.
Set oMail = Server.CreateObject("CDONTS.newmail")
'oMail.ishtml= False
'oMail.Host = "www.yourdomain.com"
'oMail.FromName = reqName
oMail.From = reqEMail
oMail.To = "yourmail@isp.com"
oMail.Subject = "Feedback"
oMail.Body = "This feedback message was sent from your website:" & VBCrLf & VBCrLf & reqMessage

' Send the feedback now & check for
' errors.
On Error Resume Next
oMail.Send()
If Err = 0 Then
' The email was successfully sent.
' Show the visitor a thank you message.
%>
Thank you!



Your feedback has been sent.
<%
Else
' The email was not sent. Show the
' visitor an error message.
%>
Error!



An error occured while sending your feedback. Please try again later.
<%
End If


' We are now ready to send the auto-response
' message. In order to do so, we must first retrieve
' the information that will be used in the auto-response
' message from a text file. Once we have done so we will
' send the email message.

' Check if the file exists. If the file exists we
' will continue, otherwise we will simply end the program
' here and not bother sending an auto-response message.
Set oFS = Server.CreateObject("Scripting.FileSystemObject")
If oFS.FileExists(Filename) Then
' The file exists. Retrieve the information
' from it.
Set oTS = oFS.OpenTextFile(Filename)
FromName = oTS.ReadLine
FromAddress = oTS.ReadLine
Subject = oTS.ReadLine
While NOT oTS.AtEndOfStream
Message = Message & VBCrLf & oTS.ReadLine
Wend
oTS.Close
Set oTS = Nothing

' Send the auto-response message.
'oMail.FromName = FromName
oMail.From = FromAddress
oMail.Subject = Subject
oMail.To = reqEMail
oMail.Body = Message
oMail.Send()
End If
Set oFS = Nothing

' Free the memory used by the email
' component.
Set oMail = Nothing
End If
%>

</BODY>
</HTML>



</BODY>
</HTML>
Anjali is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 02-10-2004, 12:19 AM   #2 (permalink)
In The Zone
 
#/bin/sh's Avatar
 
Join Date: Apr 2004
Location: 42.65 N 73.76 W
Posts: 213
Default

NOt sure about your code but you can use CDO like this:
Code below works, I use it: uses port 25, no configuration. Had problem with configuration on local machine.

strTo = Request.Form("Email") 'Make sure the From field has no spaces.
strFrom = "youremail@yourdomain.com"
strSubject = "Your Subject"
strBody = "The content of email"


' Create an instance of the NewMail object.
Set objCDOMail = Server.CreateObject("CDO.Message")

' Set the properties of the object
objCDOMail.Sender = StrFrom
objCDOMail.To = strTo
objCDOMail.Subject = strSubject
objCDOMail.TextBody = strBody


' Some of the more useful ones I've included samples of here:
'objCDOMail.Cc = "mailto:a@abc.com;b@abc.com" Notice this sending to more than one person!
'objCDOMail.Bcc = "c@abc.com;d@abc.com"
'objCDOMail.Importance = 1

'objCDOMail.AttachFile "c:\path\filename.txt", "filename.txt"

' Send the message!
objCDOMail.Send

' Set the object to nothing because it immediately becomes
' invalid after calling the Send method + it clears it out of the Server's Memory.
Set objCDOMail = Nothing
__________________
\"99 little bugs in the code, 99 bugs in the code, fix one bug, compile it again, 148 little bugs in the code. 148 little bugs in the code....\"
#/bin/sh is offline  
Old 02-10-2004, 12:25 AM   #3 (permalink)
In The Zone
 
#/bin/sh's Avatar
 
Join Date: Apr 2004
Location: 42.65 N 73.76 W
Posts: 213
Default

OR u can used ur same code
You can copy the CDONTS dll onto the server and register it using regsvr32 and it should work
Use your existing CDONTS page and copy the cdonts.dll from a windows 2000 machine into c:\Windows\System32.
Then you click Start then Run and put in
and registered as
start ->
run -> command as follows*

regsvr32
%:\windows\system32\cdonts.dll

where
- % = check the drive.
then you can
able to use CDONTS on winxp and win3k.
__________________
\"99 little bugs in the code, 99 bugs in the code, fix one bug, compile it again, 148 little bugs in the code. 148 little bugs in the code....\"
#/bin/sh is offline  
Old 04-10-2004, 01:43 AM   #4 (permalink)
Right Off the Assembly Line
 
Join Date: Jul 2004
Posts: 18
Default

both solution work great,
secound one is good
Thanks you for help.
Anjali is offline  
 

Bookmarks

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


 
Latest Threads
- by Sujeet
- by clinton
- by Who
- by bhaskar
- by soumya

Advertisement




All times are GMT +5.5. The time now is 11:42 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2