Enable/Disable a Mail account

Hi,

can someone confirm, that this litte script das not work anymore. It should disable the first Account. I only get an AppleEvent error.

tell application "Mail"
set enabled of account 1 to false
end tell

Here, under 10.13.6 the account #1 is Gmail.

Your code doesn’t disable it and issue no error.

Thanks for testing. So it already didn’t work in earlier versions of macOS. :frowning: