powered by Jive Software

Email on away

I’‘ve seen this suggested around, but didn’‘t see an implementation on the boards, so I thought I’'d try my hand at it and drop a link to it here.

http://www.tempstop.net/emailOnAway-plugin.tgz

The plugin source and jar files are in there.

This plugin will forward messages to a user’'s “email address” that are “away”.

“email address” is defined as either the one listed in that user’‘s vcard entry or, if that’'s missing, then the user@domain from the JID … both the To and the From are set this way.

“away” is defined as (exactly )

presenceManager.getPresence(userTo).toString().toLowerCase().indexOf(“away”) != -1

… which of course probably isn’'t the best way since this is my first stab at it

I think it’‘d be easy to translate this one line to “offline” instead of “away”… or make an admin screen to choose which to use (there’‘s no admin screen with this as there’'s nothing to configure) based upon what you really want.

We are using this for putting our cell phone’'s email address in the vcard entry and getting those notifications on our cells when we are away from the computer… constant contact is important to us.

Just thought I’'d share

Hi Nick,

Thanks for sharing.

You might be interested in JM-236. You can read about some suggestions people have come up with and some of the issues that I ran into when writing a similar plugin.

Cheers,

Ryan

I’'ve added this in the comments of JM-236

Is it just me, or does it appear that this plugin is broken in Wildfire 2.5.0?

I thought I’‘d better say something in case people are depending on this plugin, do an upgrade, and find it no longer works. At least, it didn’'t for me…

When I put it into the plugins directory and restart Wildfire, plugins stop loading when the server gets to this one, and this one never loads. If I remove this plugin, all of my regular plugins load fine.

Looks like something changed in the latest Wildfire build. Darn - this looked really useful, too!

I haven’‘t upgrade to wildfire 2.5.0 yet … actually I’‘m still on the latest build of jive messenger … I wonder if it’‘s just a namespace problem… since I built it in the last version of jive messenger I mean… might be an easy renaming fix… I’'ll post here when I get wildfire installed and the plugin working on it.

That might explain the problem. grin.

I hope it’‘s easy to sort out. The plugin looks great, and could be stellar with a few more options - though the development team is on the task, I see. Hopefully we’'ll see something in a few weeks time. A nice solution like this in the meantime would be great news, though.

Thanks for the quick reply!

Hi Nick,

If you need any help with upgrading your plugin to work with Wildfire let me know. Generally, it pretty easy, you just need to change page names from messenger to wildfire and tweak the jsps (if you have any) to use Sitemesh.

Regards,

Ryan

ok… updated for use with wildfire 2.5.0

http://www.tempstop.net/emailOnAway-plugin.tgz

Both the new and old versions/sources are in there. To use it, just drop the emailOnAway_1_1.jar file in your Wildfire plugins directory. I’‘ve re-tested it with Gaim just now, but I expect that Spark will still work too. If you find a client it doesn’'t work with let me know.

So … testing recap… with the plugin enabled…

  • Login to the server from account (A)

  • Login to the server from account (B)

  • Set B’'s email address in their vcard information to a forwarding email address

  • Set B as “away” (which should natually happen after some idle time)

  • Send a message to (B) …

B should get the IM AND a message to their forwarding address… we use fowarding addresses of email to SMS addresses for our phones.

A should get a notification that B is away and where the message was forwarded to.

I haven’'t added any options yet… but that should be pretty easy… any requests?

I just installed the plugin.

It’'s loading perfectly now (the file inside the tgz download file is missing the extension, so that was a few seconds of fun until I figured out what was going on and renamed it - Windows gets excited about missing filename extensions).

All the plugins load now, including the emailOnAway extension. Excellent!

I just did a test message to myself while away, and it worked like a charm.

All of the features I can think of probably require a fair bit of work - such as being able to specify an SMS e-mail address independantly of the e-mail address in the vCard (probably set by the admin would be easiest, rather than trying to cobble together something that lets the user edit it), and the ability to turn the feature on and off on a user by user basis.

The development team is working on something like this, with those types of features in place. My impression is that it’‘s not far off, so it almost makes no sense to go too crazy with this plugin unless the features would carry over and avoid wasting your work - I’'m just glad it works as it is!

In our setup, we set up an IT Services server, and put all of our IT people on it, then joined it with the regular user servers at the various sites (with remote groups for each site - it’‘s quite nice). We can put this plugin on our IT server so our IT guys all get SMS messages if there’‘s a problem and they’‘re away. Users, though, don’‘t want it to always be active like that, and they somtimes refer to the e-mail addresses in the vCards to contact one another - so an SMS address in there leads to confusion. With that in mind, we’'ll avoid deployment on their servers until a more configurable solution is available. But as this sits now, our IT guys are extremely reachable, which makes the users happy as clams - this is going to be awesome!

Thanks for all your work - it’'s much, much appreciated!

Actually…I do have a request, as it turns out (an easy one)…

With Telus’’ SMS service (Telus is the big phone provider on the west coast of Canada), it doesn’‘t process the “from” field of the e-mail address. I get something along the lines of “From 6245”, rather than a name (I’‘m not even sure where it’'s getting “6245” from at the moment).

It’‘s be nice if it’'d put the name in the message body, if possible - that would solve the problem. grin.