I hope this helps someone!
Ara Derderian
HDTV and Home Theater Podcast
http://www.htguys.com
- Code: Select all
set recipientName to "YourName"
set recipientAddress to "youraddress@yourmailprovider.com"
set theSubject to "IP Address Changed"
set newIPAddress to word 25 of (do shell script "/usr/bin/curl checkip.dyndns.org")
if the value of variable "IPAddress" is not equal to newIPAddress then
set the value of variable "IPAddress" to newIPAddress
tell application "Mail"
##Create the message
set theMessage to make new outgoing message with properties {subject:theSubject, content: newIPAddress, 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 if