Email notifications

An instant messenger which can connect to AIM, GTalk, Jabber, ICQ, and more.
Post Reply
andyst
Harmless
Posts: 6
Joined: Tue Jul 01, 2008 3:49 pm

Email notifications

Post by andyst »

Hi-
I’m running Adium on my computer upstairs, but when I’m downstairs (Kitchen, Living Room etc) I can’t tell if someone I want to chat to is signing in.
I see there are several option for getting Adium to play a sound, or pop-up a notification, but I’d like it to be able to send me an email with something like: “Alice has just signed in!”. Then my iPhone will ping and I can see that someone I want to talk to is now online.
Is that possible via an Applescript? And can anybody write the script for me cos I’m useless at that sort of thing!
(PS I’ve seen Prowl which is a possibility, but it costs!)
mtimmsj
Frappa
Posts: 144
Joined: Wed Jun 08, 2005 6:55 pm
Location: Olympia, WA

Re: Email notifications

Post by mtimmsj »

This isn't as simple as it seems due to some limitations to the Adium AppleScript run functionality of alerts. To begin with there is no data published to an AppleScript run via an alert. So for example you could send an e-mail but you couldn't have that e-mail tell you which contact actually logged in unless you created a different script for every contact you care about. To make this as simple as possible you could open script editor, copy/paste the following script into it and update the properties to make them what you want then save the script to something like alice_signon.scpt and assign the signon alert for alice to that script.

Code: Select all

property emailaddress : "example@email.com"
property theContact : "Alice"

on run
	tell application "Mail"
		set myDate to current date
		set theNewMessage to make new outgoing message with properties {subject:"Contact " & theContact & " has logged on", content:"date and time: " & myDate, visible:true}
		tell theNewMessage
			make new to recipient at end of to recipients with properties {address:emailaddress}
			send
		end tell
	end tell
end run
Repeat for each contact and save each new script to a different name. This requires that you use Apple Mail or at least have it setup to send e-mails properly.
andyst
Harmless
Posts: 6
Joined: Tue Jul 01, 2008 3:49 pm

Re: Email notifications

Post by andyst »

Hi -
It’s late so I don’t have time to study your answer in details, but it looks like exactly what i want. It would only be for a few contacts I would want this kind of notification. I’ll have more time tomorrow to look at it in details, and I’ll let you know how it goes!
Many thanks,
Andy
Post Reply