Msn Task

Description

A task to send a message to an Msn user. Requires the use of Anthony Tang's Java Msn library to connect to an Msn server.

Attribute Description Required
from Buddy name of the sender. This is a buddy name to be used to connect to the server. The buddy must exist (as we will see below) attribute
password password of msn "from" user. attribute
to user to send message. At least one of these, or the equivalent elements.
tolist Comma-separated list of users to send messages.
message Message to send to buddy/buddies. This or a <message> element.

Parameters specified as nested elements

to

Adds a user element. It takes no attributes.

message

Specifies the message to include in the IM.

Examples

Example 1

  .
  .
  .
  <taskdef name="msn" classname="com.tfftech.ant.taskdefs.im.msn.MsnTask" /> 
  <target name="main">
  <msn from="buildmaster@passport.com" to="otherimname@msn.com" password="pass">
  	<message>The nightly build has completed</message> 
  </msn>
  .
  .
  .

Sends an IM from buildmaster to otherimname@msnserver.com, authenticating on AIM with the password pass. The IM sent is "The nightly build has completed".

Example 2

  .
  .
  .
  <taskdef name="msn" classname="com.tfftech.ant.taskdefs.im.msn.MsnTask" />
  <target name="main">
  <msn from="buildmaster@passport.com" password="passwd" tolist="user1@somekindabuildplace.org,user2,user3">
        <message>The nightly build has completed</message>
  </msn>
  .
  .
  .

Sends an IM from builduser to multiple users user1@somekindabuildplace.org,user2@somemsnserver.net and user3@somemsnserver.net, authenticating with the password pass. The IM sent is "The nightly build has completed".

The following is equivalent to the above (Example 2):

Example 3

  .
  .
  .
  <taskdef name="somemsnserver.org" classname="com.tfftech.ant.taskdefs.im.msn.MsnTask" />
  <target name="main">
  <msn from="buildmaster@passport.com" password="pass">
        <to>user1@somekindabuildplace.org</to>
        <to>user2</to>
        <to>user3</to>
        <message>The nightly build has completed</message>
  </msn>
  .
  .
  .

Copyright © 2003 Thought For Food Tech, LLC. All rights reserved.