Auto-sync: 2026-02-13 13:21:42
This commit is contained in:
19
skills/macos-mail/send_email.scpt
Normal file
19
skills/macos-mail/send_email.scpt
Normal file
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/osascript
|
||||
on run argv
|
||||
if (count of argv) < 2 then
|
||||
return "Usage: send_email.scpt <recipient> <subject> <body>"
|
||||
end if
|
||||
|
||||
set recipientAddress to item 1 of argv
|
||||
set msgSubject to item 2 of argv
|
||||
set msgContent to item 3 of argv
|
||||
|
||||
tell application "Mail"
|
||||
set newMessage to make new outgoing message with properties {subject:msgSubject, content:msgContent, visible:false}
|
||||
tell newMessage
|
||||
make new to recipient at end of to recipients with properties {address:recipientAddress}
|
||||
end tell
|
||||
send newMessage
|
||||
end tell
|
||||
return "Email sent to " & recipientAddress
|
||||
end run
|
||||
Reference in New Issue
Block a user