A
Andyza
I use the method below to send emails from an asp page that's part of a
web application:
<!--METADATA TYPE="typelib" UUID="CD000000-8B95-11D1-82DB-00C04FB1625D"
NAME="CDO for Windows 2000 Library" -->
<%
On error Resume Next
Dim cdoConfig, cdoMessage
Set cdoConfig = Server.CreateObject("CDO.Configuration")
With cdoConfig.Fields
.Item(cdoSendUsingMethod) = 2
.Item(cdoSMTPServer) = "MailServer.Name.com"
.Item(cdoSMTPServerPort) = 25
.Update
End With
Set cdoMessage = Server.CreateObject("CDO.Message")
With cdoMessage
Set .Configuration = cdoConfig
.From = "Me<[email protected]>"
.To = "You<[email protected]>"
.Subject = "Surprise!"
.TextBody = "Helloooo..."
.Send
If err.number Then
Response.Write("Houston! We have a problem...")
End If
End With
Set cdoMessage = Nothing
Set cdoConfig = Nothing
%>
On the production server (Windows 2003 Server) everything works fine
and I don't have a problem sending the mails from the application.
However, I recently upgraded my development box to Windows XP Pro SP2
and the code fails with with the following error:
CDO.Message.1 (0x80040213)
The transport failed to connect to the server.
The from and to email addresses that I'm using are valid and part of my
domain (not a Hotmail or other freemail address).
The SMTP service is up and running on the dev box.
I also tried replacing the mail server name with the IP address of the
mail server, but again it's failing.
We are running Exchange Server for email and if I change the
cdoSendUsingMethod to 3 (for cdoSendUsingExchange) the mail is sent
correctly without errors.
Will I not able to use the cdoSendUsingPort method to send the email if
I'm on Exchange? Am I forced to use cdoSendUsingExchange?
Thanks
web application:
<!--METADATA TYPE="typelib" UUID="CD000000-8B95-11D1-82DB-00C04FB1625D"
NAME="CDO for Windows 2000 Library" -->
<%
On error Resume Next
Dim cdoConfig, cdoMessage
Set cdoConfig = Server.CreateObject("CDO.Configuration")
With cdoConfig.Fields
.Item(cdoSendUsingMethod) = 2
.Item(cdoSMTPServer) = "MailServer.Name.com"
.Item(cdoSMTPServerPort) = 25
.Update
End With
Set cdoMessage = Server.CreateObject("CDO.Message")
With cdoMessage
Set .Configuration = cdoConfig
.From = "Me<[email protected]>"
.To = "You<[email protected]>"
.Subject = "Surprise!"
.TextBody = "Helloooo..."
.Send
If err.number Then
Response.Write("Houston! We have a problem...")
End If
End With
Set cdoMessage = Nothing
Set cdoConfig = Nothing
%>
On the production server (Windows 2003 Server) everything works fine
and I don't have a problem sending the mails from the application.
However, I recently upgraded my development box to Windows XP Pro SP2
and the code fails with with the following error:
CDO.Message.1 (0x80040213)
The transport failed to connect to the server.
The from and to email addresses that I'm using are valid and part of my
domain (not a Hotmail or other freemail address).
The SMTP service is up and running on the dev box.
I also tried replacing the mail server name with the IP address of the
mail server, but again it's failing.
We are running Exchange Server for email and if I change the
cdoSendUsingMethod to 3 (for cdoSendUsingExchange) the mail is sent
correctly without errors.
Will I not able to use the cdoSendUsingPort method to send the email if
I'm on Exchange? Am I forced to use cdoSendUsingExchange?
Thanks