0
我想創建一個數字電子表格。在該電子表格中,我想要COL A電子郵件地址欄B城市名稱COL C其他城市名稱等。我將手動輸入該數據。數字|電子郵件| Applescript
接下來我要做的是讓applescript在數字電子表格中逐行瀏覽並向列中的每個人發送電子郵件。我想在電子郵件主題或正文中使用其他變量。
任何幫助,將不勝感激!我是最好的程序員新手。我知道一些python,但是對於applescript是新的。
僞代碼(也許?)
tell numbers to open spreadsheet
repeat for each line of spreadsheet
tell mail to create email
for address COL A
for subject "Hello (COL B) I need the following Information (COL C)
for email Body "Blah Blah Blah (Col D) blah blah."
send email
end repeat
電子郵件功能
on email(a, b, c, d)
set recipientName to a
set recipientAddress to b
set theSubject to c & " --> " & d & "Shipment"
set theContent to a & ", if you would like assistance with your shipment moving from " & c & " to " & d & " , or any other shipment you may have, please let me know. We have drivers available in your Area of Operations ready for pick up."
tell application "Mail"
##Create the message
set theMessage to make new outgoing message with properties {subject:theSubject, content:theContent, visible:true}
##Set a recipient
tell theMessage
make new to recipient with properties {name:recipientName, address:recipientAddress}
##Send the Message
send
end tell
end tell
end email
my email(COL A, COL B, COL C, COL D)
另外它還沒有完成有兩個剩餘的功能,但他們將幾乎相同的接收者名稱功能 – TYPKRFT