Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cannot get attachments using MAPIMAIL with Thunderbird
Message
From
21/12/2005 14:39:52
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Cannot get attachments using MAPIMAIL with Thunderbird
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01079978
Message ID:
01079978
Views:
132
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.zip

Actual 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=321105

Any 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
Reply
Map
View

Click here to load this message in the networking platform