Has anyone ever handled a drag drop of emails from thunderbird? any references links code?
I want to be able to drag emails from thunderbird to my application?
It looks like it isn't possible. Although I can't seem to find any actual documentation, here is what my experimentation has found so far.
Thunderbird provides drop data with the following MIME types, when tested against an IMAP server:
text/x-moz-message
- UTF-16 encoded URL that looks like imap-message://user@server/FOLDER#ID
text/x-moz-url
- UTF-16 encoded URL that looks like imap://user@server:port/fetch%3EUID%3E/FOLDER%3EID
text/uri-list
- ASCII (?) URL that looks like imap://user@host:port/fetch%3EUID%3E/FOLDER%3EID"
_NETSCAPE_URL
- ASCII (?) URL that looks like imap://user@host:port/fetch%3EUID%3E/FOLDER%3EID
application/x-moz-file-promise-url
- UTF-16 encoded URL that looks like imap://user@host:port/fetch%3EUID%3E/FOLDER%3EID?fileName=SUBJECT.eml
application/x-moz-file-promise
- EmptyThe relevant Thunderbird code is here, but AFAICS it is not finished... What I did was writing a Thunderbird extension that overrides the draggesture
event of #threadTree treechildren
and calls a slightly modified version of ThreadPaneOnDragStart
that writes the dragged message somewhere inside the temp directory (using SaveMessageToDisk
), returning the file name as application/x-moz-file-promise
(or whatever you'd like to catch inside your application).
This has two drawbacks. since the file is created when dragging starts and not when it ends:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With