CDO mail failure on Exchange Server

Discussion in 'ASP General' started by Andyza, Jun 30, 2005.

  1. Andyza

    Andyza Guest

    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<>"
    .To = "You<>"
    .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
     
    Andyza, Jun 30, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Guest
    Replies:
    2
    Views:
    956
    dave wanta
    Jul 11, 2003
  2. Bruce Hodge
    Replies:
    0
    Views:
    434
    Bruce Hodge
    Feb 15, 2006
  3. newbie
    Replies:
    2
    Views:
    269
    newbie
    Mar 3, 2004
  4. Roberto
    Replies:
    4
    Views:
    169
    [MSFT]
    Nov 3, 2004
  5. Jim in Arizona

    ASP/CDO Mail and Exchange 2000 on AD Domain

    Jim in Arizona, Mar 31, 2005, in forum: ASP General
    Replies:
    1
    Views:
    166
    Ray Costanzo [MVP]
    Mar 31, 2005
Loading...

Share This Page