Mapi error when Windows Mail is not running.

Discussion in 'Windows Vista Mail' started by ScottV, Jun 9, 2006.

  1. ScottV

    ScottV Guest

    I am trying to send an E-Mail to the outbox using the MapiSendMail function
    of the MAPI32.dll. If Windows Mail is already running, everything works fine.
    If Windows Mail is not running, Windows Mail is launched silently, but
    MapiSendMail returns MAPI_E_FAILURE.

    Any ideas?

    ScottV, Jun 9, 2006
    1. Advertisements

  2. Hmm... try bugging this -
    It may actually require a reinstallation to get it fixed - but check the
    feedback on the bug report on Connect first.

    Zack Whittaker
    » ZackNET Enterprises:
    » MSBlog on ResDev:
    » Vista Knowledge Base:
    » This mailing is provided "as is" with no warranties, and confers no
    rights. All opinions expressed are those of myself unless stated so, and not
    of my employer, best friend, Ghandi, my mother or my cat. Glad we cleared
    that up!

    --: Original message follows :--
    Zack Whittaker, Jun 9, 2006
    1. Advertisements

  3. Try looking in the Event Log for an error with ESENT in it. If you have
    also installed Outlook, try this:

    Try running the following command:

    "C:\Program Files\Windows Mail\WinMail.exe" /reg

    Check first that "WinMail.exe" is in that path and modify the path if
    needed. See if that will fix the problem since a similar command for
    "msimn.exe" (the old executable for Outlook Express) would often repair the
    problem after an install of Outlook (which includes any downloads that might
    update Outlook or Office by altering the default mail program). Let us know
    if it works and you may need to reboot.
    Jim Pickering, Jun 9, 2006
  4. ScottV

    ScottV Guest

    I tried adding C:\Program Files\Windows Mail to the PATH environment
    variable, but it did not change the behavior.

    Windows Mail is being launched, and I do get the "A program is attempting to
    send the following e-mail message on your behalf" dialog box, but as soon as
    I click on the Send button, I get the MAPI_E_FAILURE error code.
    ScottV, Jun 10, 2006
  5. Is Hotmail (or MSN Live Mail) set as your default mail program? If so,
    might look at this article:

    PRB: You Receive the MAPI_E_FAILURE (2) MAPI Result Code If You Use Some
    Hotmail Simple MAPI functions:;en-us;315500

    Also look in Windows Mail under Tools/Options/Security - is the box checked
    to "warn when applications attempt to send mail"?
    Jim Pickering, Jun 10, 2006
  6. ScottV

    ScottV Guest

    Windows Mail should be the default mail program. The Start menu displays it
    the default mail program, and if Windows Mail is currently running, emails
    are sent to Windows Mail.

    I tried turning off the "warn when applications attempt to send mail?". The
    prompt was not displayed, but the error still happened.
    ScottV, Jun 10, 2006
  7. And there are no errors in the Event Log concerning ESENT? I find that hard
    to believe. Have you looked at the Event Log to see since there are details
    there that may be helpful to finding a solution.
    Jim Pickering, Jun 10, 2006
  8. There is currently a bug that does not allow one to save messages to the
    various folders, but if its working with WinMail open and not when its
    closed, then I'd check Event Viewer, as Jim indicated and see if there are
    ESENT errors.

    If not, then bug it. Or bug it anyway.

    Steve Cochran, Jun 15, 2006
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.