i used this and the error is below
<%
' send by connecting to port 25 of the SMTP server
Dim iMsg
Dim iConf
Dim Flds
Dim strHTML
Dim strSmartHost
Const cdoSendUsingPort = 2
StrSmartHost = "
[email protected]"
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
' build HTML for message body
strHTML = "<HTML>"
strHTML = strHTML & "<HEAD>"
strHTML = strHTML & "<BODY>"
strHTML = strHTML & "<b> This is the test HTML message body ff</b></br>"
strHTML = strHTML & "</BODY>"
strHTML = strHTML & "</HTML>"
' apply the settings to the message
With iMsg
Set .Configuration = iConf
.To = "
[email protected]"
.From = "
[email protected]"
.Subject = "This is a test CDOSYS message (Sent via Port 25)"
.HTMLBody = strHTML
.Send
End With
' cleanup of variables
Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing
%>
error
Technical Information (for support personnel)
Error Type:
CDO.Message.1 (0x80040213)
The transport failed to connect to the server.
/ont/test3.asp, line 44
Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
Page:
GET /ont/test3.asp
Time:
Friday, April 22, 2005, 1:45:57 PM