Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AppleScript + Mail (+ Java)



The original list thread ended about Jan. 13. I suggested JNI(Direct) and launch services to determine applications supporting the mailto url protocol.
I was sort of curious about java application code that actually did run AppleScripts on Mail.app.
If you have any curiosity...


I recently tinkered to set up digital signing of my mail using a Thawte freemail certificate and was curious about how you actually determine anything about the signatures in Mail.app? I think it will highlight expired certificates with an option to look at them in that instance but there is no other provision made for examining signed mail signatures that I'm aware of. This will list Mail.app mailboxes, show list of signed messages in selected mailbox, show brief info about selected signed message's signature.

Code Dependancies:
Mail.app
bouncycastle     http://www.bouncycastle.org/

The executable (+ source)
http://www.spacestar.net/users/mikehall/mailsigs.jar

The jar should be double-clickable.

The AppleScript to obtain the list of signed messages is as efficient as I could make it with my limited AppleScript skills. It's reasonably snappy on a mailbox with 638 messages, somewhat less so on one with 3135 messages. The AppleScript is all invoked with Runtime exec of osascript.
3 or 4 scripts are run all told, one to list mailboxes, one to list signed messages of the selected mailbox, and one to return the raw source of the selected message. Three then I guess, unless I'm forgetting one. I wrote a few test ones as well that I ran from 'Script Editor. The one to return the mail message raw source invariably stalled out and so needed my fancier multi-threaded Runtime stuff.


Source if the curiosity extends
jar -xvf mailsigs.jar src/


Mike Hall mikehall at spacestar dot net http://www.spacestar.net/users/mikehall http://sourceforge.net/projects/macnative



Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden

References: 
 >Re: AppleScript + Mail (+ Java) (From: Jeremy Wood <email@hidden>)
 >Re: AppleScript + Mail (+ Java) (From: email@hidden)
 >Re: AppleScript + Mail (+ Java) (From: Shawn Erickson <email@hidden>)
 >Re: AppleScript + Mail (+ Java) (From: Michael Hall <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.