Waht server are you using? CDONTS has been depreciated by MS (2003 server). You can make it work by downloading the cdonts.dll (dont forget to register it)
FYI: Use the search within this forum. There are many solutions here, have you tryed this?
IMO you should be using CDOSYS:
<!--
Sending SMTP mail via port 25 using CDOSYS This ASP page
uses CDOSYS to send SMTP mail using port 25 of the SMTP
server that is set. The e-mail delivery is handled by the
SMTP server that is set in the configuration object.
-->
<%
Const cdoSendUsingPort = 2
Dim iMsg,iConf,Flds,strHTML,strSmartHost
StrSmartHost = "192.168.0.9"
set iMsg = CreateObject("CDO.Message")
set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
'set the CDOSYS configuration fields to use port 25 on the SMTP server
With Flds
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPort
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = strSmartHost
.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 10
.Update
End With
'apply the settings to the message
With iMsg
Set .Configuration = iConf
.To = "aaa@bbb.com.au"
.From = "ccc@ddd.com.au"
.Subject = "CDOSYS Test"
.HTMLBody = "Sent using CDOSYS..."
.Send
End With
' cleanup of variables
Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing
response.write "mail sent"
%>
Wind is your friend
Matt
|