Am 29.11.2007 um 17:31 schrieb John Cradock:

Is there an easy way to get an entire message from Mail into Yojimbo,
including the headers? I know I can select the text and then import
it, but is there one step way of getting all of this in?

Jim Correia once posted this (or something like this, can't remember if I changed something).

It shouldn't be too hard to change it such that all desired headers are included.


on generateMessageText(m)
        tell application "Mail"
                set _sender to sender of m
                set _subject to subject of m
                set _date to date received of m as string
                set _contents to content of m
                set _messageString to "From: " & _sender & return
                set _messageString to _messageString & "Subject: " & _subject & 
return
                set _messageString to _messageString & "Date: " & _date & return
                set _messageString to _messageString & return & return & 
_contents
        end tell
end generateMessageText

on run
        tell application "Mail"
                tell message viewer 1
                        set messageList to selected messages
                        set _name to subject of item 1 of messageList
                        set _contents to ""
                        repeat with m in messageList
                                set _contents to _contents & my 
generateMessageText(m)
                        end repeat
                        tell application "Yojimbo"
                                make new note item with properties 
{contents:_contents, name:_name}
                        end tell
                end tell
        end tell
end run

--
------------------------------------------------------------------
This message is sent to you because you are subscribed to
 the mailing list <yojimbo-talk@barebones.com>.
To unsubscribe, send mail to: <[EMAIL PROTECTED]>
List archives:  <http://www.listsearch.com/yojimbotalk.lasso>
Have a feature request, or not sure if the software's working correctly? Please send mail to: <[EMAIL PROTECTED]>

Reply via email to