Re: Sending email with attachments
Re: Sending email with attachments
- Subject: Re: Sending email with attachments
- From: Lorenzo Thurman <email@hidden>
- Date: Tue, 1 Feb 2011 17:32:20 -0600
Thanks for the reply. I'll likely go this route for now and just exclude
support for all non-Mail.app clients.
On Tue, Feb 1, 2011 at 4:33 PM, Tim Schröder <email@hidden> wrote:
> 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 email@hidden:
>
> > 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 (email@hidden)
> >
> > 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:
> >
> > This email sent to email@hidden
>
>
--
"My break-dancing days are over, but there's always the funky chicken"
--The Full Monty
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden