Reading message attachments using Nigel Coates MAPIMAIL class and Thunderbird as MAPI application is not working.
When I get messages using MAPI client, attachment count is zero.
Message body contains attachments in encoded form.
This problem does not occur when Outlook Express is MAPI client.
Reproducible: Always
Steps to Reproduce:
1. Place unread message with attached file to Thunderbird Inbox folder
2. Run the following code: (probably occurs with other MAPI client also):
local oMAPI, vmess
oMAPI = newobject( 'cusMAPI','mapimail.vcx' )
vmess =oMAPI.ReadMail( '', '', .t., '', '' )
if m.vmess< 1
messagebox('no msg')
RETURN
endif
oMAPI.GetFirstMessage()
cResult = subs( oMAPI.GetSubject(), len('#xxxx#')+1 )
? oMAPI.GetSubject()
? omapi.getbodytext()
oMAPI.GetAttachmentCount()
MESSAGEBOX( ' attachment count ' + TRANSFORM(oMAPI.GetAttachmentCount() ) )
This code uses free MAPIMAIL class from
http://nbcsoftware.nbcwebservices.com/download/Freeware/mapimail.zipActual Results:
1. Message body printed contains also attached file.
2. "attachment count 0" message will appear.
Expected Results:
Attached file cannot be inside message body.
"attachment count 1" message must appear.
I opened a bug in
https://bugzilla.mozilla.org/show_bug.cgi?id=321105Any idea how to fix this ?
Is there a sample code which reads message from POP3 mail serveri using pure FoxPro code like SMTP email sample in Steve's wiki ?
Andrus