none
Cannot send email using CDO after KB2141007 is applied RRS feed

  • Question

  • Hi,

    I am creating an application where I can send emails with CDO(cdosys).
    Here I want to specify an SMTP server, and send it with NTLM authentication.
    User will be able to specify the SMTP server name(IP) and its credentials.

    I have successfully implemented the above using impersonation and referring to sample code below:
    http://msdn.microsoft.com/en-us/library/aa487412%28EXCHG.65%29.aspx

    But I found out that I cannot send emails when the application is running from the SMTP server itself after a Windows Update.

    I get error messages like:
    "The server rejected the sender address. The server response was: 530 5.7.3 Client was not authenticated"
    "The message could not be sent to the SMTP server. The transport error code was 0x80040217. The server response was not available"

    Depending on the SMTP Virtual Server Access settings.

    To be more specific, I get "The server rejected the sender address. The server response was: 530 5.7.3 Client was not authenticated" when:
    - Only Integrated Windows Authentication is checked.

    And I get "The message could not be sent to the SMTP server. The transport error code was 0x80040217. The server response was not available" when:
    - Basic, and Integrated Windows Authentication all are checked.

    It seems emails can be sent in some cases when Anonymous is checked, but that my requirement is that Anonymous must be unchecked.

    After trial and error for a long time, I found that update in KB2141007 caused this issue to come up. Before installing KB2141007, or after uninstalling KB2141007 from the system, I am successfully able to send emails from my program.

    My environment is
    - Windows Server 2003 x86 SP2
    - Visual Studio 2008 SP1
    - IIS6 SMTP Service

    I tested on Windows 2008, and it will work whether KB2141007 is installed or not.
    Also I set up Outlook Express in the same server, and I can send emails from there.

    Does anyone know what are the changes in KB2141007, and anything I can do to make the application send emails? I assume that any updates in Windows Update will not break the existing code, it should work like it is working for my Windows 2008 case. Anyone know any known issues or workarounds?
    • Moved by Rob Pan Monday, January 30, 2012 3:27 AM (From:Visual C++ General)
    Friday, January 27, 2012 7:59 AM

Answers

All replies