Lorenzo,

at least with Thunderbird I have found it impossible to communicate with from a 
Cocoa app. Mail.app, Entourage, Outlook 2011 and Postbox should work with 
AppleScript which you can address from within your app with the NSAppleScript 
class. In principle, you just need to give an instance of NSAppleScript the 
name of the email application and the script code necessary to create a new 
message and to attach a file to it. The path to the file to be attached can be 
part of the script code. For example, the script code to accomplish that with 
Postbox should be like "tell application "Postbox" .. activate .. send message 
attachment [path to file] .. end tell". However, for scriptable clients you 
will need different script code as they all use their own 'dialects' of 
AppleScript.

On how to determine the default mail application, I usually use 
LSGetApplicationForURL passing "mailto:";.

Best,

Tim



Am 01.02.2011 um 23:13 schrieb lorenzo7...@gmail.com:

> How can one go about doing this and support 10.4-10.6? There are links all 
> over the place pointing to deprecated API's (NSMailDelivery) or frameworks 
> that are 10.5+ (EDMessage, Scripting Bridge), but nothing I can use. All I 
> want to do is open the default mail application, create a new message, attach 
> a file and then allow the user to address it and send. That should not be too 
> difficult, I should think. Is an Automator action the way to go? Can someone 
> help me out?
> Thanks
> _______________________________________________
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/tim%40timschroeder.net
> 
> This email sent to t...@timschroeder.net

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to