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>
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>