Need to make a Cocoa Java app email some text
Need to make a Cocoa Java app email some text
- Subject: Need to make a Cocoa Java app email some text
- From: "Ian G. Gillespie" <email@hidden>
- Date: Wed, 12 Dec 2001 22:42:50 -0800
OK folks, here is the problem (I am using the Cocoa Java API's and I am
a novice): I have an app, which upon clicking a button, I want it to
take the text from an NSTextView and open the users default mail program
and insert the text in the body of an email message. I have tried using
NSWorkspace.sharedWorkspace().openURL() and put in a URL that has
"
mailto:" in it. This works, except to get the text in the email you
have to encode it and so when it appears in the email it has a "+"
between every word. There is an Obj-C class, something like,
NSMailMessage, which isn't available for Java. It seems to me I have
two options: 1) get sun's java mail classes or 2) bridge the Obj-C
NSMail-whatever class. If I do number 1, where do I put the .jar files
so that I can import them into my classes in Project Builder? If I do
number 2, well, I have no idea how to do number 2... Anyone have any
suggestions?
Thanks and Regards,
Ian Gillespie