Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3321098
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T23:01:19+00:00 2026-05-17T23:01:19+00:00

I’m working on a Cocoa application into which I’d like to allow Mail messages

  • 0

I’m working on a Cocoa application into which I’d like to allow Mail messages to be dropped.

If I include public.plain-text in my Info.plist Document Types, I can drop a Mail message on the icon in the Dock and get a file path like this from the application:openFiles: delegate method:

"/Users/smokris/Library/Caches/TemporaryItems/Re_ multiplexer question 3.eml"

…and I can read the raw message data from this file. So far so good.

However, I also want the user to be able to drop Mail messages on the application window. So I do this:

[window registerForDraggedTypes:[NSArray arrayWithObjects:(NSString *)kPasteboardTypeFileURLPromise,nil]];

…and in performDragOperation:, I get a URL like this from the pasteboard:

message:%3CAANLkTikeTeWYU39JpTovxF2PC0Mm=xkrU7fHNh6gGh6V@mail.gmail.com%3E

If I try doing an NSURLRequest on this URL, it gives me the error “unsupported URL”.

How can I get the raw message data from this message: URL?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T23:01:20+00:00Added an answer on May 17, 2026 at 11:01 pm

    I tried it out with Apple’s PasteboardPeeper sample code (from http://developer.apple.com/library/mac/#samplecode/PasteboardPeeker/Introduction/Intro.html), and dragging a message into the main did show that the path of the message is available:

    PasteboardRef: 1395632  ItemCount: 1
       Index: 1  item ID: 789514
          "dyn.ah62d4rv4gu8y4zvanr41xxxxx30n25wqz4ca5pfsr30c35feb4he2pssrxgn6vasbu1g7dfqm1"
          "MV Super-secret message transfer pasteboard type"
          '' ______ 82  /Users/guest/Library/Mail/IMAP-me@gmail.com@imap.gmail.com/INBOX.imapmb
    
          "dyn.ah62d4rv4gu8zg7puqz3c465fqr3gn7bakf41k55rqf4g86vasbu1g7dfqm10c6xeeb4hw6df"
          "Super-secret Automator pasteboard type"
          '' ______ 454  <?xml version= 1.0  encoding= UTF-8 ?> < DOCTYPE plist PUBLIC  -//Apple//DTD PLI
    
          "dyn.ah62d4rv4gu8yc6durvwwa3xmrvw1gkdusm1044pxqyuha2pxsvw0e55bsmwca7d3sbwu"
          "Apple files promise pasteboard type"
          '' ______ 212  <?xml version= 1.0  encoding= UTF-8 ?> < DOCTYPE plist PUBLIC  -//Apple//DTD PLI
    
          "public.url"
          ""
          'url ' ______ 74  message: 3C6EEF5CFD6A04D6395BC617836C91FC3A050542759970026E@cornell.edu 3E
    
          "public.url-name"
          ""
          'urln' ______ 56  A friend thought you would be interested in this station
    
          "com.apple.pasteboard.promised-file-content-type"
          ""
          '' ______ 23  dyn.ah6xxxqmxhk2x43prru
    
          "com.apple.pasteboard.promised-file-url"
          ""
          '' ______ 0  
    
          "dyn.ah62d4rv4gu8y6y4usm10xxxxqzb085xyqz1hk64uqm10c6xenv61a3k"
          "NSPromiseContentsPboardType"
          '' ______ 0  
    
          "dyn.ah62d4rv4gk81a4dgsq"
          ""
          'phfs' PT____ 14  ????????  Pssf
    

    I don’t know what “MV Super-secret message transfer pasteboard type” is, but you might not want to rely on it as a key name; rather, maybe you could just walk through all the keys and see if any of them look like a file path.

    P.S. This might also be of interest: http://www.wuffwuffware.com/developer.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I would like to run a str_replace or preg_replace which looks for certain words
I have a text area in my form which accepts all possible characters from
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
I would like to count the length of a string with PHP. The string
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small
this is what i have right now Drawing an RSS feed into the php,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.