用这个代替 cdonts
<!--
METADATA
TYPE="typelib"
UUID="CD000000-8B95-11D1-82DB-00C04FB1625D"
NAME="CDO for Windows 2000 Library"
-->
<%
Function SendMail(sFrom, ToA, Subject, Mybody)
Dim iMsg,iConf
Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
Dim Flds
Set Flds = iConf.Fields
With Flds
' assume constants are defined within script file
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServer) = MAILSERVER
.Item(cdoSMTPConnectionTimeout) = 60
.Item(cdoURLGetLatestVersion) = True
.Update
End With
With iMsg
Set .Configuration = iConf
.To = ToA
.From = sFrom
.Subject = Subject
.TextBody = Mybody
.Send
End With
Set iConf = nothing
Set iMsg = nothing
If Err.Number = 0 Then
SendMail = True
Else
SendMail = Err.Number&":"&Err.Description
End If
On Error Goto 0
set objSendMail = Nothing
End Function
%>