WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

MAPI

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

710 MAPIReadMail failed Using Outlook 2003


Answer:

I wrote a WinBatch application a couple of years back that goes through a mailbox looking for a subject line that contains specific text. When it finds the mail it processes some data in the body of the email and creates an HTML table of data rows that contain entries that exceed certain thresholds. It has been working fine since I created it. The mail client on the systems where it has be used is Outlook 2000. We upgraded to outlook 2003 and it stopped working. I just revisited it to see what I could tweak to make it work and I can't seem to get it working.

I thought I would try the example in the MAPI extender help file to rule out my code completely. That doesn't work either. I tried my updated code on a Windows 2000/Office 2000 box and it still works. So it seems that the issue is related to the version of Outlook, although the OS is different on both machines as well. I added lines to the example to get the current directory and set up the debug trace to write to a file in that directory, but otherwiise the example is unchanged.

I get the following from the DebugTrace...

************************************************************

*** Debug Initialized ***

==============================
Thu 1/19/2006 10:34:13 AM
WinBatch 32 2005C
WIL DLL 5.7ceg
F:\Programming\Mail\BCCSpy\test.WBT
Windows platform: NT, version: 5.1, build: 2600 (Service Pack 2)
ErrorMode: @CANCEL
==============================

----- Extender loaded: C:\Program Files\WinBatch\System\wwmap34i.dll (file version: 27007,0,0,0)

AddExtender("wwmap34i.dll")
(63) VALUE INT => 1

mhdl=mlogon("")
(219) VALUE INT => 282862648

Message("DEBUG" , mhdl)
(1766) VALUE INT => 1

mailid=""
(1766) VALUE STRING => ""

While @True
(1782) WHILE==>TRUE

mailid=mFindNext(mhdl,mailid,1)
(2047) VALUE STRING => "0M`````#-]2[M2 
Message("DEBUG" , mailid)
(2766) VALUE INT => 1

if mailid=="" then break
(2782) ==>FALSE=> (skipped)

msgbody=mReadNextMsg(mhdl,mailid,1)
(5000) VALUE INT => 0

TERMINAL EXTENDER ERROR=>710 (710: MAPIReadMail failed.)

;;;END OF JOB;;;
-------------------------------------
I see that my message body is "0", so apparently it isn't reading the message. I tried to look up this error on the web support page for WinBatch but couldn't find it. Does anyone have any ideas?

Answer:

Looks like this problem may have been addressed in the latest service pack for Office 2003:

http://support.microsoft.com/default.aspx?scid=kb;en-us;833856&Product=out2003


Article ID:   W16834
File Created: 2017:07:28:13:58:30
Last Updated: 2007:07:03:14:26:27