It's very easy to send an email programmatically. For example, in Perl you can do this:
open(MAIL, "|/usr/sbin/sendmail -oi -t") or die;
print MAIL "From: ...\n";
print MAIL "To: ...\n";
print MAIL "Subject: ...\n";
print MAIL "\n";
print Mail "... body ...";
close(MAIL);
I'd like to collect simple, self-contained snippets of code for programmatically sending an instant message (IM) in various languages (especially Perl) and for various protocols (especially jabber/gmail and AIM and Yahoo). See this question for a failed attempt in Perl for gchat: http://stackoverflow.com/questions/799648/error-using-perl-jabber
Or of course if there were an email-to-IM (instant message) gateway then sending an IM would be as easy as email. Perhaps no such thing exists but if anyone makes one, this would be a good place to point to it!
(Keywords to make this question more searchable: email, IM, instant messaging, jabber, xmpp, AIM, yahoo messenger, gmail, gchat, msn.)
PS: It's been over a year now and I suspect these answers are a little stale. Is there a better way to encourage updated answers besides re-asking the question?