Initial backup 2026-02-17
This commit is contained in:
22
skills/apple-mail/scripts/mail-accounts.sh
Normal file
22
skills/apple-mail/scripts/mail-accounts.sh
Normal file
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
# List configured email accounts
|
||||
# Usage: mail-accounts.sh
|
||||
|
||||
osascript <<EOF
|
||||
tell application "Mail"
|
||||
set output to ""
|
||||
repeat with acct in every account
|
||||
set acctName to name of acct
|
||||
set acctType to account type of acct as string
|
||||
set acctEmail to ""
|
||||
try
|
||||
set acctEmail to email addresses of acct
|
||||
if class of acctEmail is list then
|
||||
set acctEmail to item 1 of acctEmail
|
||||
end if
|
||||
end try
|
||||
set output to output & acctName & " (" & acctType & ") - " & acctEmail & linefeed
|
||||
end repeat
|
||||
return output
|
||||
end tell
|
||||
EOF
|
||||
Reference in New Issue
Block a user