MozillaZine

Getting Attachment information in Thunderbird

Talk about add-ons and extension development.
DanielT
 
Posts: 8
Joined: February 4th, 2008, 10:53 am
November 4th, 2009, 4:10 pm

Post Posted November 4th, 2009, 4:10 pm

Hi All,

I am working on an add-on for thunderbird that replicates some of the functionality for the xobni extension for outlook and run into a stumbling block with the attachment handling.

The only method I can find for getting attachment information is the currentAttachments array, however this is only populated when a message is opened in the preview pane. For various reasons I'd prefer grabbing the attachment details as soon as the email hits the inbox. I've got hooks in place to grab incoming messages but can see no way to get attachment details from a nsIMsgDBHdr object.

Has anyone got any ideas on how I can accomplish this?

Thanks,
Daniel

Rod Whiteley

User avatar
 
Posts: 9843
Joined: December 6th, 2004, 3:41 am
Location: UK
November 6th, 2009, 8:27 am

Post Posted November 6th, 2009, 8:27 am

The nsIMsgDBHdr only provides information from the index (the .msf file) that might be needed for building the thread tree (the list of messages). For anything else, you must parse the entire message. For an example of code that parses a message, look inside the Header Tools extension.
Rod

DanielT
 
Posts: 8
Joined: February 4th, 2008, 10:53 am
November 6th, 2009, 11:41 am

Post Posted November 6th, 2009, 11:41 am

Thanks,

I'll check it out.

Return to Extension Development


Who is online

Users browsing this forum: No registered users and 4 guests