Blog: Notifications

Reply ABOVE this LINE to POST a COMMENT to a Drupal Site
Multilingual Engineer

Plug In Gives You the Best of Both Email and Web Forum Features

Plug In Gives You the Best of Both Email and Web Forum Features

"Reply ABOVE this LINE to POST a COMMENT." This is how automatic email notifications from the teams' intranet blog posts look these days. And it's true! Now I can just reply to any email notification I receive and my comment will appear on our intranet. The only bad thing is that I don't have an excuse anymore for not replying right away ;-)

Typically there are two ways to carry on online discussions and to keep up with the replies - mailing lists (that may have a web interface) and web forums (that may have email subscriptions). Though each of one has its own advantages and drawbacks, trying to mix both usually ends up in long threads of differently formatted messages. Besides, mailing lists are usually exposed to spamming (worse yet if spam ends up on the web) and the "from" address is really easy to forge.

As usual, we wanted it all - the reliability and readability that come with authentication in a web forum and the ease of replying through a mailing list. Since we already had the Notifications and Messaging framework and an excellent mailhandler module to fetch incoming emails, it was just a question of putting the pieces together and adding some extra security/authentication into the recipe to get to this. 

Check the new "Mail2web" plug-in in the Notifications module. This first version is for Drupal 5. And by the way, we just released the Drupal 6 version of both Notifications and Messaging modules. The Mail2Web Drupal 6 version, however, will have to wait for the mailhandler module.

Being paranoid about security and spam, we added a more secure method for message authentication than the ones currently used. Our outgoing emails have some digitally assigned parameters that are checked when the reply comes back. Thus only emails posted as a direct 'Reply-To' operation will get in as responses. And replies to a given thread will get only into that thread, nowhere else. But best of all, these tokens are completely invisible for a regular user and should work with most email clients without the need to install any extra software. (You can set an expiration time frame for replies too).

So what do I need to to do to get it working?

Moving Fast: Messaging and Notifications
Multilingual Engineer

An Overview of the Latest Improvements and New Features

An Overview of the Latest Improvements and New Features

Some time ago we released the Notifications and Messaging packages as two handy and flexible frameworks to handle user subscriptions, notifications, and multiple messaging methods.

The good welcome to these tools by other developers has pushed us to keep working hard on them and that means a lot of improvements have gotten into both frameworks since the initial release. Thanks to everyone who's been sending feedback and/or patches for them. We've also been using the frameworks for our Intranet for some time now (yes, they work!) so a lot of ideas and improvements have come from our day to day user experience.

Here are a few of the big improvements:

  • Two new messaging plug-ins
  • SMS developed by Tim Cullen
  • PHPMailer contributed by Ted Serbinski
  • Better message formatting, improved filtering, and nice HTML to text conversion
  • Support for bulk messaging - not just for sending messages to single users anymore
  • Many usability improvements and bug fixes

There are now lots of different plug-ins for different subscription types and more coming. You'll be able to manage them all from your user account. 

Here's a look at the main messaging settings page. See the new SMS and HTML mail (Phpmailer) plug-ins enabled and available:

As a simple proof of how easy is to develop a new messaging method plug-in, both of the new ones are around 100 lines of code and that's counting comments and white lines :-). Also we're learning as we go and based on this experience,  plug-in support is now much improved so itwill be even easier to create new ones.

We'll be presenting this work at the Boston DrupalCon so if you are interested in better notifications for your website users, you shouldn't miss the Mail, Notifications, and Messaging Framework session next week.

Coming soon: Upgrading to Drupal 6

Playing with FeedAPI and Notifications
Multilingual Engineer

A More Efficient Way of Keeping People Posted

A More Efficient Way of Keeping People Posted

As we have these two powerful frameworks, FeedAPI and the new Notifications framework I talked about  in my last post, I was thinking it would be cool to have them work together. Users already had the option to stay subscribed (i.e. to all nodes created of a given type), but this didn't seem like a very efficient way of getting notifications for all updated feed items. 

So I’ve implemented this new notifications plug-in that allows you to subscribe to a feed and then get lists of new/updated items. To see it working please take a look at the notifications_feed.module in the notifications package.

The resulting email notification looks like this:

This simple module takes advantage of the existing Notifications and Messaging frameworks to implement - with just a few lines of code - a new event type (Feed update) and a new subscription type (Subscribe to feed) with all the features, such as configurable sending methods, queueing, and custom message templates.

The idea, in short, is that we can now easily create any custom plug-in to keep users posted about anything with just a few lines of code, while having all the gory details like message templating and delivery, user subscriptions,  notifications queueing for large sites, etc. automatically handled by these modules. 

And you don't need to create any new table or field for managing all this data!

The notifications_feed.module is already part of the Notifications Framework.

Keeping People Posted: Notifications and Messaging
Multilingual Engineer

Two New Frameworks to Give You More Options

Two New Frameworks to Give You More Options

Do you want a nice Ajax UI that lets users subscribe to comments by a given user, but only for nodes of a given content type and that have a certain tag assigned, oh, and only for comments posted on Friday? Do you also want these notifications sent to you printed on nice postcards?

Then you should check out the Notifications Framework. Nope, it doesn't do all that - yet :-) - but you won't have to write it all from scratch. You'll only need to write the UI plug-in, a short module defining the parameters for this subscription type, and the 'print-and-send-to-the-post-office' module, which I think will be the most difficult one. Hey, and if you contribute back the 'print-and-send-to-the-post-office' module, I'll be able to use it with my 'happy-birthday' plugín to send birthday postcards to the users of my website!

Here's a look at the Notifications Framework in Drupal:

And here's how it looks in use on our intranet: