I've been working on a script to create new employee mail accounts in Mail.app (v3.5 / 10.5.6) and have run across the following problems:
Setting the POP account password fails silently -Under Preferences the POP password field is empty
Setting the SMTP server authentication, user and password fails silently -Under Preferences the SMTP authentication mode is "None" -List archives show this as a problem way back in 2003 - still not fixed?
Creating a new signature (kind-of) fails silently and (kind-of) hangs Mail -If you have the Preferences window open when you add a new sig, you can see the sig count increase and the new sig might be listed, but you can't select it -After adding a new sig, window behavior is spotty (prefs window won't open or close, can't change tabs in prefs window, etc) -Restarting Mail fixes the window issues, but the new sig is gone
The Apple-supplied Create New Mail Account.scpt fails in the same way. I'm guessing these are all bugs with no work-arounds - does anyone know any different?
Cliff
Here's a script that demonstrates all of the above (OMM):
tell application "Mail" -- create new pop account set theNewAccount to make new pop account with properties { name:"Test Account", user name:"TestUser", server name:"pop.testing.com", password:"password", full name:"Just Testing", email addresses:{" email@hidden"}} get properties of theNewAccount
-- create new SMTP server. authentication:"password" or :"Password" don't work either set theNewServer to make new smtp server with properties {server name:"smtp.testing.com", authentication:password, user name:"testing", password:"password"} get properties of theNewServer
-- create new signature set sigContent to return set sigContent to sigContent & "--------------" & return set sigContent to sigContent & "The Name" & return set sigContent to sigContent & "The Company" & return set sigContent to sigContent & "The Address" & return set sigContent to sigContent & "The City and State" & return set sigContent to sigContent & "The Phone Number" & return set sigContent to sigContent & "The Fax Number" & return set sigContent to sigContent & "The URL" set newSig to make new signature with properties {name:"Test Sig", content:sigContent} set selected signature to "Test Sig" get properties of newSig end tell |