dchell
asked on
MAPI Spooler hangs while submitting email using Extended MAPI
I'm using Extended MAPI to send emails, it works fine the first couple of times but on about the third time the MAPI spooler hangs during the pMessage->SaveChanges or pMessage->SubmitMessage call. I'm sending very small plain text emails and no attachments to myself (to test).
What causes this and how can I fix it?
What causes this and how can I fix it?
I am not sure what your problem is since I do not know what OS and network you are on? But you might want to take a peek at this thread here: http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=unsgfb9R%24GA.226%40cppssbbsa02.microsoft.com&rnum=1&prev=/groups%3Fq%3Dextended%2Bmapi%2Bspooler%2Bhangs%26ie%3DUTF-8%26oe%3DUTF-8%26hl%3Den
ASKER
I've tested it using Outlook '97 on Win2K and Windows Messaging on NT4 - it works fine on NT4. the problem occurs with Win2k.
I checked out the message thread above. I'm already doing what it suggests to get around the problem - calling the status object's FlushQueues method. Plus I'm also checking the service provider's outbound queue status flags to wait until the queue has been emptied. So I know there's nothing in the Outbox at the time that I Submit my message and MAPI hangs.
Another thing I noted is that if I don't call FlushQueues but make my app hang around long enough doing nothing before I logoff MAPI until MAPI finally gets around to sending the messages itself then the problem doesn't occur.
The message also states that there are plenty of articales about the problem in MSDN - where? I can find plenty of references to "MAPI spooler terminates unexpectedly" but that's not the same problem.
I checked out the message thread above. I'm already doing what it suggests to get around the problem - calling the status object's FlushQueues method. Plus I'm also checking the service provider's outbound queue status flags to wait until the queue has been emptied. So I know there's nothing in the Outbox at the time that I Submit my message and MAPI hangs.
Another thing I noted is that if I don't call FlushQueues but make my app hang around long enough doing nothing before I logoff MAPI until MAPI finally gets around to sending the messages itself then the problem doesn't occur.
The message also states that there are plenty of articales about the problem in MSDN - where? I can find plenty of references to "MAPI spooler terminates unexpectedly" but that's not the same problem.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.