apple script mail problems
Chuck
xtension4osx at mac.com
Mon Aug 3 16:14:42 EDT 2020
I use this for my texting and email and it is pretty flawless. I highlighted the parts you need to change in red. This sends text and email messages to me and my wife. To do text you need to know the domain of your provider. Text is much faster than email plus I get the obligatory sound on my phone.
I recorded a shotgun racking one into the chamber which plays and then the stereo is turned up really loud to confuse the bad guy. Since we have whole house stereo the bad guy can’t get away from it. Criminals don’t like surprises, rarely have contingency plans and don’t expect loud music.
Chuck
property |unitlist| : {“1234567890 at txt.att.net", “0987654321 at txt.att.net", “email at domain.com", “email2 at domain.com"}
property freezerTemp : {}
set freezerTemp to value of "Temp bsmt freezer"
--This is a paging routine from Chuck
repeat with unitName in |unitlist| -- this allowed the event to go to any recipient I put in the list
set theName to ""
set theSender to “sendersEmail at domain.com"
--if you want the time string included in the message you could do it like so:
--include it in the subject:
set theSubject to "***** ALERT!!!! ****** The freezer temperature is " & freezerTemp
--include it in the body:
set theBody to "" & return & return
set theAddress1 to unitName
tell application "Mail" -- this sends the event to the pagers
set newMessage to make new outgoing message with properties {subject:theSubject, content:theBody & return & return}
tell newMessage
set visible to true
set sender to theSender
make new to recipient at end of to recipients with properties {name:theName, address:theAddress1}
tell content
end tell
send newMessage
end tell
end tell
end repeat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.machomeautomation.com/pipermail/xtensionlist/attachments/20200803/0b8ce4c2/attachment.html>
More information about the XTensionList
mailing list