我正在尝试运行通过 Apple Mail 发送电子邮件的 AppleScript。它似乎工作正常,但是当我运行脚本时出现错误。
这是我看到的错误:
error "Can’t get text item 1 of \"\"." number -1728 from text item 1 of ""
这是我的脚本:
set csv to read "/Users/Username/Documents/file.csv" as «class utf8»
set text item delimiters to ","
repeat with l in paragraphs of csv
tell application "Mail"
tell (make new outgoing message)
set subject to "subject"
set content to "content"
make new to recipient at end of to recipients with properties {address:text
item 1 of l}
send
end tell
end tell
end repeat
这是我的 CSV:
email1@gmail.com
email2@gmail.com
关于我做错了什么的任何想法?谢谢!