• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
reading preferences from com.apple.mail under 10.8
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

reading preferences from com.apple.mail under 10.8


  • Subject: reading preferences from com.apple.mail under 10.8
  • From: Rob McBroom <email@hidden>
  • Date: Tue, 31 Jul 2012 11:07:51 -0400

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.

I’ve tried

    NSUserDefaults *mailPrefs = [[NSUserDefaults alloc] init];
    NSArray *smtpList = [[mailPrefs persistentDomainForName:@"com.apple.mail"] objectForKey:@"DeliveryAccounts"];

and

    NSArray *mailPrefs = (__bridge NSArray *)CFPreferencesCopyValue((CFStringRef)@"DeliveryAccounts", (CFStringRef)@"com.apple.mail", kCFPreferencesCurrentUser, kCFPreferencesAnyHost);

but neither return any results on a 10.8 system. My application is not sandboxed. Mail is, but so is TextEdit and I have no problem reading its prefs.

Any ideas? Thanks.

--
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


  • Follow-Ups:
    • Re: reading preferences from com.apple.mail under 10.8
      • From: Charles Srstka <email@hidden>
    • Re: reading preferences from com.apple.mail under 10.8
      • From: Shane Stanley <email@hidden>
    • Re: reading preferences from com.apple.mail under 10.8
      • From: Jens Alfke <email@hidden>
  • Prev by Date: Re: Trying to capture raw touch events on the trackpad
  • Next by Date: Re: Icon Overlay on Mac OSX
  • Previous by thread: Re: Trying to capture raw touch events on the trackpad
  • Next by thread: Re: reading preferences from com.apple.mail under 10.8
  • Index(es):
    • Date
    • Thread