drag and drop emails
Posted: Thu Dec 31, 2020 3:56 pm
Hi All,
I've been struggling with drag and drop for a few days and have hit a brick wall. In short - I'm building a task manager type app that allows the user to gather all the relevant information about a task in one place. So far I can drag & drop files, text and URLs to my app and everything works (the app stores the dragged data so it ve be viewed/opened). However, if i try to drag an email from Apple Mail or Outlook clients I simply can't figure out how to handle this. If you drag & drop a selected message from either Apple Mail or Outlook to a finder window then a file with type ".eml" is created and double-clicking that file opens Apple Mail (or default mail app) and shows the message - so clearly something tangible is being dragged & dropped. Ideally I'd like my app to store this .eml file somewhere and allow the user to open the relevant message by opening it from in my app just as it current does with word, excel and other file types.
I've tried looking at the keys (and contents of the keys) or dragdata[], rawdragdata[], fulldragdata[] and even the raw clipboard and, whilst some of these arrays contain information, none of it appears to be usable to store either the message or a link to the message in my app.
Any ideas would be very welcome!
I've been struggling with drag and drop for a few days and have hit a brick wall. In short - I'm building a task manager type app that allows the user to gather all the relevant information about a task in one place. So far I can drag & drop files, text and URLs to my app and everything works (the app stores the dragged data so it ve be viewed/opened). However, if i try to drag an email from Apple Mail or Outlook clients I simply can't figure out how to handle this. If you drag & drop a selected message from either Apple Mail or Outlook to a finder window then a file with type ".eml" is created and double-clicking that file opens Apple Mail (or default mail app) and shows the message - so clearly something tangible is being dragged & dropped. Ideally I'd like my app to store this .eml file somewhere and allow the user to open the relevant message by opening it from in my app just as it current does with word, excel and other file types.
I've tried looking at the keys (and contents of the keys) or dragdata[], rawdragdata[], fulldragdata[] and even the raw clipboard and, whilst some of these arrays contain information, none of it appears to be usable to store either the message or a link to the message in my app.
Any ideas would be very welcome!