On May 21, 2013, at 4:30 PM, Fritz Anderson <fri...@manoverboard.org> wrote:

> [I'd accidentally posted my reply off-list. Bringing it back.]
> 
> The times I've autogenerated emails, I did so without thinking of alternate 
> clients. On MacOS, I used -[NSWorkspace openURL:], which can be funky for a 
> long or non-ASCII body, but could be made to work. The system should honor 
> the user's choice for mailto: handlers.

OK, I need to read some more about mailto handlers. I dipped my toe in this 
while trying to figure out how to move away from the my old applescript 
methods, but I kind of got stuck. I'm assuming one can do attachments in a 
mailto url?

> 
> But that may be hard to integrate with NSSharingService. Perhaps you could 
> fall back on mailto: in the didFail… delegate method.


I've no real desire to use NSSharingService. If I find a way to reliably send a 
mail (with attachments) then I'll be most delighted.

Cheers,

Martin

> 
>       — F
> 
> 
> On 21 May 2013, at 12:52 AM, Martin Hewitson <martin.hewit...@aei.mpg.de> 
> wrote:
> 
>> Hi Fritz,
>> 
>> I did take a look at the delegate callbacks, and 
>> -sharingService:didFailToShareItems:error: is called when the default client 
>> is anything other than Mail.app, but the error is 'empty' so presenting it 
>> to the user doesn't reveal what's wrong.
>> 
>> More importantly, this sharing by email doesn't seem to work for any other 
>> app I tried when the default mail client is not Mail.app. Seems strange to 
>> me. Do you have experience of sharing my mail working for, say, Thunderbird? 
>> With any app at all?
>> 
>> Cheers,
>> 
>> Martin
>> 
>> 
>> 
>> On May 20, 2013, at 05:00 PM, Fritz Anderson <fri...@manoverboard.org> wrote:
>> 
>>> On 19 May 2013, at 8:29 AM, Martin Hewitson <martin.hewit...@aei.mpg.de> 
>>> wrote:
>>> 
>>>> I'm exploring the use of NSSharingService for emailing (sharing) documents 
>>>> from within my app. It's working fine if the system's default mail client 
>>>> is set to Mail.app. But if it's set to, for example, Thunderbird, nothing 
>>>> happens.
>>>> 
>>>> I also confirmed the same behavior from the Share menu in Pages.app. Works 
>>>> fine for Mail.app, but not for any other mail client I tried. The user is 
>>>> not notified, just nothing happens. 
>>>> 
>>>> Is this a bug or a feature?
>>>> 
>>>> I really wish there was a solid way to send a mail from within an app on 
>>>> OS X. With the whole sandbox/applescript debacle, I was hoping that 
>>>> NSSharingService would at least work well on 10.8, but, apart from the 
>>>> 'bug' described above, there seems to be no way to set the recipients or 
>>>> subject of the mail.
>>> 
>>> You've described the user-visble behavior, but not the actual behavior of 
>>> your code.
>>> 
>>> Have you registered a delegate and examined the content of 
>>> -sharingService:willShareItems:, -sharingService:didShareItems:, and 
>>> -sharingService:didFailToShareItems:error:? Do they get called? With the 
>>> expected items? If didFail…, what was the error?
>>> 
>>>     — F
>>> 
>>> -- 
>>> Fritz Anderson
>>> Xcode 4 Unleashed: 4.5 supplement for free!
>>> http://www.informit.com/store/xcode-4-unleashed-9780672333279
>>> 
>> 
>> 
>> 
>> 
>> 
> 
> -- 
> Fritz Anderson
> Xcode 4 Unleashed: 4.5 supplement for free!
> http://www.informit.com/store/xcode-4-unleashed-9780672333279
> 




_______________________________________________

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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

Reply via email to