03-21-05 11:02 PM
Port 25 on the firewall has to be open, but that's the only place the
firewall would come into play. Have you looked at the SMTP log files?
Jeff
On Mon, 21 Mar 2005 18:23:32 -0000, "William Tasso"
<spamblocked@tbdata.com> wrote:
>Hello
>
>I have a trivial CDO example script (below) which works perfectly. A
>colleague using my script as a base always gets error: "The transport
>failed to connect to the server." The only differences I can see are
>these calls...
>
>
>[**** start snippet
>
>Const cdoSendUsingMethod =
>"http://schemas.microsoft.com/cdo/configuration/sendusing"
>Const cdoSendUsingPort = 2
>Const cdoSMTPServer =
>"http://schemas.microsoft.com/cdo/configuration/smtpserver"
>Const cdoSMTPServerPort =
>"http://schemas.microsoft.com/cdo/configuration/smtpserverport"
>Const cdoSMTPConnectionTimeout =
>"http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout"
>Const cdoSMTPAuthenticate =
>"http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"
>Const cdoBasic = 1
>Const cdoSendUserName =
>"http://schemas.microsoft.com/cdo/configuration/sendusername"
>Const cdoSendPassword =
>"http://schemas.microsoft.com/cdo/configuration/sendpassword"
>
> Dim Fields ' As ADODB.Fields
> Set Fields = objConfig.Fields
>
> ' Set configuration fields we care about
> With Fields
> .Item(cdoSendUsingMethod) = cdoSendUsingPort ' send method
> .Item(cdoSMTPServerPort) = 25 ' smtp port #
> .Item(cdoSMTPConnectionTimeout) = 10 ' Connection
>Timeout
> .Item(cdoSMTPAuthenticate) = cdoBasic ' basic
>authentication
> .Item(cdoSMTPServer) = "mail.example.com" ' a real
>smtp server
> .Item(cdoSendUserName) = "valid@example.com" ' a real user
>name
> .Item(cdoSendPassword) = "password" ' a real
>password
> .Update
> End With
>
>end snippet ****]
>
>
>
>I'm clutching at straws now and starting to wonder if there's a rule
>needed on the firewall to allow these outgoing calls. Any clues
>appreciated.
>
>
>
>
>[********** Trivial CDO Mail Script **********]
>
><!--METADATA TYPE="typelib"
> NAME="CDO for Windows 2000 Library"
> UUID="CD000000-8B95-11D1-82DB-00C04FB1625D"
> -->
><%
>' mail-cdo-sample.asp
>option explicit
>
>dim sMessage ' As string
>sMessage = "Contact has been made." & vbCrLf & "This is a test message
> from the cdo script." & vbCrLf
>
>Dim objConfig ' As CDO.Configuration
>Set objConfig = Server.CreateObject("CDO.Configuration")
>
>Dim Fields ' As ADODB.Fields
>Set Fields = objConfig.Fields
>
>' Set configuration fields we care about
>With Fields
> .Item(cdoSendUsingMethod) = cdoSendUsingPort ' send method
> .Item(cdoSMTPServerPort) = 25 ' smtp port #
> .Item(cdoSMTPConnectionTimeout) = 10 ' Connection
>Timeout
> .Item(cdoSMTPAuthenticate) = cdoBasic ' basic
>authentication
>
> .Item(cdoSMTPServer) = "mail.example.com" ' a real smtp serve
r
> .Item(cdoSendUserName) = "valid@example.com" ' a real user name
> .Item(cdoSendPassword) = "password" ' a real password
>
> .Update
>End With
>Set Fields = Nothing
>
>Dim objMessage ' As CDO.Message
>Set objMessage = Server.CreateObject("CDO.Message")
>
>Set objMessage.Configuration = objConfig
>Set objConfig = Nothing
>
>With objMessage
> .To = "mailbox@example.com"
> .From = "valid@example.com"
> .ReplyTo = "valid@example.com"
> .Subject = "test from cdo"
> .TextBody = sMessage
> .Send
>End With
>
>Set objMessage = Nothing
>
>%>
>
>Thanks for looking
[ Post a follow-up to this message ]
|