Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Straightforward way to access Text and Attachments of any message from inside an extension?

4 views
Skip to first unread message

m4rV4

unread,
Apr 13, 2007, 11:39:10 AM4/13/07
to dev-apps-t...@lists.mozilla.org

Hi!
Is there a convenient way to access the attachments and text of any message
(not just of the currently selected) by using Javascript code?
My current method is to save the message to disk, open the file and load its
contents into a string.
This is not only a very slow method, but also difficult to implement.

So do you know a way to get the attachments and message text more
efficiently?

Thanks!
Marvin
--
View this message in context: http://www.nabble.com/Straightforward-way-to-access-Text-and-Attachments-of-any-message-from-inside-an-extension--tf3572296.html#a9981250
Sent from the Mozilla - Thunderbird mailing list archive at Nabble.com.

David Bienvenu

unread,
Apr 13, 2007, 11:46:07 AM4/13/07
to
If you've already got the code to parse the message, I'd suggest
streaming the message - that skips the save to disk part...

http://developer.mozilla.org/en/docs/nsIMsgMessageService#streamMessage

- David

gNeandr

unread,
Apr 13, 2007, 12:21:05 PM4/13/07
to
On 13.04.2007 17:46 schrieb »David Bienvenu«
Hi David,

this is very close for what I need also! see my previous posting:
messenger.saveAttachmentToFolder fails with: TB Build ID: 2007032620

The background is, I want to process the attachment(s) for iCal/ICS data.
Thought there is a "saveAttachmentToFolder" available, but that only
worked till the previous TB release !

Is there a method to "read" the attachment into a stream similar to
"nsIScriptableInputStream" ??

Günter

0 new messages