Mail wont save my account settings
Mail wont save my account settings
- Subject: Mail wont save my account settings
- From: David Siberry <email@hidden>
- Date: Thu, 7 Jul 2005 13:53:42 +0100
Hi,
I have written a script which should update my mail.app settings of an
e-mail account called "David".
If you change the fields of the account manually i.e. change e-mail
address, full name ect to something different, when the script is run
it shoud change them back to what is allocated in the script. However
when you run the script it does change the settings, but when you shut
down mail.app and restart mail.app the settings revert back to the
previous settings. It does not seem to be saving the settings.
Please see script below...
Can anyone help?
Thank you kindly,
David
Here is the script
on setupSMTP()
tell application "Mail"
--SMTP Constants
set cSMTPName to "DSMTP"
set cSMTPAccType to "smtp"
set cSMTPEnabled to 1
set cSMTPUserName to "smtpUserName"
set cSMTPPort to 24
set cSMTPServerName to "smtp.mail.com"
set cSMTPUsesSSL to 1
set cSMTPAuth to "password"
set cSMTPPassword to "pass"
set createIT to true
set p1 to get every smtp server whose server name is equal to cSMTPServerName
repeat with x in p1
set properties of x to {name:cSMTPName, account type:cSMTPAccType,
enabled:cSMTPEnabled, user name:cSMTPUserName, port:cSMTPPort, server
name:cSMTPServerName, uses ssl:cSMTPUsesSSL, authentication:cSMTPAuth,
password:cSMTPPassword}
set createIT to false
end repeat
if (createIT is equal to true) then
set s to make new smtp server with properties {name:cSMTPName,
account type:cSMTPAccType, enabled:cSMTPEnabled, user
name:cSMTPUserName, port:cSMTPPort, server name:cSMTPServerName, uses
ssl:cSMTPUsesSSL, authentication:cSMTPAuth, password:cSMTPPassword}
set properties of s to {name:cSMTPName, account type:cSMTPAccType,
enabled:cSMTPEnabled, user name:cSMTPUserName, port:cSMTPPort, server
name:cSMTPServerName, uses ssl:cSMTPUsesSSL, authentication:cSMTPAuth,
password:cSMTPPassword}
end if
end tell
end setupSMTP
on setupEmail(x)
tell application "Mail"
set popUN to "David Account"
set popFullName to "David Siberry"
set popServerName to "pop.mail.com"
set popPassword to "password"
set popEmailAddresses to "email@hidden"
set popIncludeWhenGettingNewMail to 1
set popPort to 115
set popEnabled to 1
set popUsesSSL to 0
set popDelayedMsgDelInt to 5
set popDeleteMailOnServer to 1
set popDeleteMsgWhenMovedFromInbox to 1
set popAuthentication to "password"
set popName to "David"
set found to 0
my setupSMTP()
set properties of x to {user name:popUN, full name:popFullName,
server name:popServerName, password:popPassword, email
addresses:popEmailAddresses, include when getting new
mail:popIncludeWhenGettingNewMail, port:popPort, enabled:popEnabled,
uses ssl:popUsesSSL, delayed message deletion
interval:popDelayedMsgDelInt, delete mail on
server:popDeleteMailOnServer, delete messages when moved from
inbox:popDeleteMsgWhenMovedFromInbox,
authentication:popAuthentication, name:popName}
end tell
end setupEmail
tell application "Mail"
set p to get every pop account whose name is "David"
repeat with x in p
my setupEmail(x)
end repeat
end tell
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden