Re: reading preferences from com.apple.mail under 10.8
Re: reading preferences from com.apple.mail under 10.8
- Subject: Re: reading preferences from com.apple.mail under 10.8
- From: Rob McBroom <email@hidden>
- Date: Thu, 02 Aug 2012 08:19:32 -0400
On Aug 2, 2012, at 1:44 AM, Jens Alfke <email@hidden> wrote:
> On Jul 31, 2012, at 8:07 AM, Rob McBroom <email@hidden> wrote:
>
>> Hello. I’m trying to read Mail’s preferences to find a suitable SMTP server so users don’t have to re-enter such configuration details. It seems to have stopped working and I can’t find a [documented] reason.
>
> Probably Mail changed where it stores that pref. It might be under a different key, or it might be stored in another domain entirely.
It didn’t. I am able to look at the plist directly, and `defaults read com.apple.mail` works as expected. I would have thought `defaults` was using `NSUserDefaults` internally, but apparently not.
> A more supported way to get that info might be to query Mail's scripting interface using an AppleScript or the scripting bridge API.
Thanks, but Scripting Bridge requires Mail to be running. That’s not on option in this context.
And I question whether Scripting Bridge is “more supported” than `NSUserDefaults`. :-)
--
Rob McBroom
<http://www.skurfer.com/>
_______________________________________________
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