Ho uno script per inviare un messaggio di posta elettronica, ma vorrei rilevare se nessun account di posta elettronica è configurato e fare qualcos'altro.
C'è un modo per rilevare o intrappolare questa condizione? Grazie.
tell application "Mail"
set new_message to make new outgoing message with properties {visible:false, subject:"AppleScript-2014", content:("Success " & linefeed & "user: " & userName & linefeed & "OS: " & (system version of (get system info)) as rich text) & linefeed & "IP: " & IPv4 address of (get system info)}
tell new_message
make new to recipient with properties {name:"Len", address:"[email protected]"}
end tell
delay 7
send new_message
end tell