SQL Server 2000 xp_sendmail fail, xp_stopmail hangs, can't kill processes

  • In a DTS routine I'm using xp_sendmail instead of the regular MAPI sendmail task because the latter kept giving me winmail.dat as an attachment (we're sending Outlook 2000 to Lotus Notes).

    An invalidly formatted email was sent via xp_sendmail (by a coworker who's just learning SQL - I think she put parameters in wrong order), which apparently hung the connection between SQL Server and MAPI, and all efforts to get it restarted so far have failed. When I researched the problem online, I read that I should do xp_stopmail then the next email attempt would restart the service.

    Unfortunately, the incorrect email was sent again, and apparently the process hung again in the process of restarting.

    However, now when I try to do an xp_stopmail I get the error message:

    Server: Msg 17955, Level 16, State 1, Line 0

    xp_stopmail: Failed to stop SQL Mail session.

    I found the process that attempted the invalid email and tried to kill it, but it fails to die and gives me the following message for hours:

    SPID 52: transaction rollback in progress. Estimated rollback completion: 100%. Estimated time remaining: 0 seconds.

    One article I found suggested that I kill the mapisp32.exe process and kill it, however that process does not seem to be running on my server, irrespective of whether Outlook is open or not. Incidentally I can still send emails directly from Outlook and it works, so that's not the problem. I'm on Outlook 2000 build 9.0.0.2711.

    I'm trying to ideally find a way to fix this without rebooting the SQL Server (we have lots of users this would affect) - the easiest way I'd guess is to somehow force the hung xp_sendmail processes to close. Anyone have any suggestions?

  • Found an alternative - xp_SMTP_Sendmail seems to work far better (and faster), avoiding the unstable MAPI interface - from what I read each email attempt creates its own link to the server, so is unlikely to screw up ensuing emails, even if it fails.

    For more information, go to http://www.sqldev.net/xp/xpsmtp.htm - note that it seems this does not come with SQL Server but has to be installed separately.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply