Re: Apple Mail 3.5: Changing Mail Server Settings
Re: Apple Mail 3.5: Changing Mail Server Settings
- Subject: Re: Apple Mail 3.5: Changing Mail Server Settings
- From: "John C. Welch" <email@hidden>
- Date: Thu, 23 Apr 2009 07:18:11 -0400
- Thread-topic: Apple Mail 3.5: Changing Mail Server Settings
On 4/22/09 6:48 PM, "Aaron Wyatt" <email@hidden> wrote:
> We're in the process of migrating to a new email server. The script
> below is supposed to iterate through all mail accounts and change the
> incoming mail server names to the new server name. When you run the
> script on 10.5.6, it seems to work-- check Mail prefs: accounts:
> incoming server-- until you quit Mail, reopen Mail, and see the
> settings are gone. I can't find anything anywhere that indicates how
> to trigger an account settings change save action via AppleScript.
> This makes me think its a bug?
>
> As you can see below, this should be so simple, and its killing me
> that it won't save the settings (no other accounts properties I change
> will save either).
>
> Any help will be greatly appreciated.
>
> Thanks,
> aaron
>
> --start script
> tell application "Mail"
> repeat with eachAccount in accounts
> set server name of eachAccount to "test.domain.edu"
> end repeat
> end tell
> --end script
>From what I can tell, the problem is "accounts" is really just a base class,
and not one you should be using directly. Instead of dealing with "accounts"
try working with imap account or pop account for incoming, and smtp server
for outgoing.
When we create accounts, it's "make new imap account..." and "make new smtp
server...", so I imagine you might have to change it that way as well.
--
Cum catapultae proscriptae erunt tum soli proscript catapultas habebunt.
(When catapults are outlawed, only outlaws will have catapults.)
Jeff La Grua
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden