Mailsmith POP Accounts

I use a simple Applescript to toggle between POP account addresses for my email accounts. At the office, I use an internal network address; elsewhere, it is an external address. It works fine for Mail.app and Entourage, but since switching to Mailsmith I can’t get it to work. My read of the script library for Mailsmith doesn’t solve my problems. A copy of the script is below :


-- button pushes go to Result
display dialog "Which POP Server? " buttons {"Work", "Home"}
set Location to (button returned of the result)

-- assign appropriate POP address
if Location = "Work" then
	set PopString to "10.0.1.2"
else
	set PopString to "pop.work.com"
end if

-- set account name variable

set AcctName to "Work"

-- change POP Server Address  to match location
tell application "Mailsmith"
	try
		activate
		set pop server of AcctName to PopString
	end try
end tell

Any ideas are welcome.

I’m not a Mailsmith user and I haven’t looked at the dictionary but maybe you need to change this:

set pop server of AcctName to PopString 

To:

set pop server of account AcctName to PopString 

– Rob

Nope. I get a syntax error about ‘account’ not being allowed after an identified.

If I delete the ‘of AcctName’ part out, it runs, but has the same non-result. Any other ideas out there/