我正在尝试使用 AppleScript + Apple Mail 将个性化的单独电子邮件发送到 CSV 文件上的人员列表。一切正常,只是发送的消息在 iOS(以及其他邮件客户端)上显示为第一个报价级别。
有什么想法可以解决这个问题吗?
set {lastname, eAddress} to getData()
repeat with i from 1 to count lastname
tell application "Mail"
activate
set mymail to make new outgoing message at the beginning of outgoing messages with properties {subject:"subject"}
tell mymail
make new to recipient at beginning of to recipients with properties {address:item i of eAddress}
delay 0
set content to "Hi Dr. " & lastname & "," & return & "Email Body"
end tell
--show message window (otherwise it's hidden)
set visible of mymail to true
--bring Mail to front
activate
send mymail
end tell
end repeat
on getData()
set colA to {}
set colB to {}
tell application "Microsoft Excel"
activate
tell active sheet
set lastRow to first row index of (get end (last cell of column 1) direction toward the top)
repeat with i from 3 to lastRow
set end of colA to (value of range ("A" & i))
set end of colB to (value of range ("B" & i))
end repeat
end tell
end tell
return {colA, colB}
end getData
你找到答案了吗?我遇到了完全相同的问题,它似乎是 mail.app 或苹果脚本故障。我尝试修改 mail.app 上的属性,并尝试使用非常简单的代码,但没有解决方案。正如你所说,如果你删除代码的发送并手动删除空格,那就没问题了。否则,提高配额水平。如果您找到任何解决方案或解决方法,请告诉我。谢谢!