editing the smtp settings in mail
editing the smtp settings in mail
- Subject: editing the smtp settings in mail
- From: David Siberry <email@hidden>
- Date: Mon, 16 May 2005 14:37:56 +0100
Hi I was wondering how I could set the server settings in Mail.app, i
need to change the Outgoing Mail server, the server port, uses SSL,
authentication setting, username and password fields.
I have looked in the Mail dictionary but there doesnt seem to be
anything that changes the settings. I tried to use some of the smtp
methods in the mail dictionary but when i run my script nothing gets
modified.
Can anyone help?
PS
I have found that I have to create an account then repopulate it if
the account doesnt exist, is there away i could do the script so I
dont have to create a undefined account?
Cheers for all your help :o)
Just for reference here is my code:
on setupSMTP()
tell application "Mail"
set s to make new smtp server
set name of s to "smtp"
set port of s to 23
end tell
end setupSMTP
on setupEmail(theAcc)
tell application "Mail"
set user name of theAcc to "David Account"
set full name of theAcc to "David Siberry"
set server name of theAcc to "pop.mail.com"
set password of theAcc to "password"
set email addresses of theAcc to "email@hidden"
set include when getting new mail of theAcc to 1
set port of theAcc to 115
set enabled of theAcc to 1
set uses ssl of theAcc to 0
set authentication of theAcc to "password"
set name of theAcc to "David"
my setupSMTP
end tell
end setupEmail
tell application "Mail"
set found to 0
-- Searches for existing e-mail account whose name is
-- equal to the string declared
set p to get every pop account whose name is "David"
repeat with x in p
-- if account found, then account is edited and
-- values are set to the required defaulted values
my setupEmail(x)
set found to 1
end repeat
if (found is equal to 0) then
-- Create new POP account
set m to make new pop account with properties {name:"undefined",
user name:"undefined", server name:"undefined", password:"undefined",
full name:"undefined", email addresses:"undefined"}
my setupEmail(m)
end if
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