diff -ru pidgin-libnotify-0.14/src/pidgin-libnotify.c pidgin-libnotify-0.14-email/src/pidgin-libnotify.c
--- pidgin-libnotify-0.14/src/pidgin-libnotify.c	2008-12-14 18:45:51.000000000 +0100
+++ pidgin-libnotify-0.14-email/src/pidgin-libnotify.c	2010-11-04 18:44:28.000000000 +0100
@@ -469,10 +469,109 @@
 	notify_msg_sent (account, sender, message);
 }
 
+static void
+notify_new_mail (const gchar *subject,
+                 const gchar *from,
+                 const gchar *to,
+                 const gchar *url)
+{
+	NotifyNotification *notification = NULL;
+  GtkWidget *img;
+	GdkPixbuf *icon;
+	gchar *tr_body;
+  gchar *body;
+
+  body = g_strdup_printf ("From %s", from);
+  tr_body = truncate_escape_string (body, 60);
+
+	notification = notify_notification_new ("New Mail", tr_body, NULL, NULL);
+  /*
+	purple_debug_info (PLUGIN_ID, "notify(), new: "
+					 "title: '%s', body: '%s', buddy: '%s'\n",
+					 title, tr_body, best_name (buddy));
+  */
+
+	g_free (tr_body);
+
+  img = gtk_image_new_from_stock ("gtk-justify-left",GTK_ICON_SIZE_SMALL_TOOLBAR);
+  icon = gtk_widget_render_icon (img,"gtk-justify-left",GTK_ICON_SIZE_SMALL_TOOLBAR,"");
+
+	if (icon) {
+		notify_notification_set_icon_from_pixbuf (notification, icon);
+		g_object_unref (icon);
+    g_object_unref (img);
+	} else {
+		purple_debug_warning (PLUGIN_ID, "notify(), couldn't find any icon!\n");
+	}
+
+	g_signal_connect (notification, "closed", G_CALLBACK(closed_cb), NULL);
+
+	notify_notification_set_urgency (notification, NOTIFY_URGENCY_NORMAL);
+
+	/*notify_notification_add_action (notification, "show", _("Show"), action_cb, NULL, NULL);*/
+
+	if (!notify_notification_show (notification, NULL)) {
+		purple_debug_error (PLUGIN_ID, "notify(), failed to send notification\n");
+	}
+}
+
+static void
+notify_new_mails (const char **subjects,
+                  const char **froms,
+                  const char **tos,
+                  const char **urls,
+                  guint count)
+{
+	NotifyNotification *notification = NULL;
+  GtkWidget *img;
+	GdkPixbuf *icon;
+	gchar *tr_body;
+  gchar *body;
+
+  if ( count == 1 )
+    {
+      notify_new_mail (*subjects,*froms,*tos,*urls);
+      return;
+    }
+
+  body = g_strdup_printf ("You have %d unread emails", count);
+  tr_body = truncate_escape_string (body, 60);
+
+	notification = notify_notification_new ("New Mails", tr_body, NULL, NULL);
+  /*
+	purple_debug_info (PLUGIN_ID, "notify(), new: "
+					 "title: '%s', body: '%s', buddy: '%s'\n",
+					 title, tr_body, best_name (buddy));
+  */
+
+	g_free (tr_body);
+
+  img = gtk_image_new_from_stock ("gtk-justify-left",GTK_ICON_SIZE_SMALL_TOOLBAR);
+  icon = gtk_widget_render_icon (img,"gtk-justify-left",GTK_ICON_SIZE_SMALL_TOOLBAR,"");
+
+	if (icon) {
+		notify_notification_set_icon_from_pixbuf (notification, icon);
+		g_object_unref (icon);
+    g_object_unref (img);
+	} else {
+		purple_debug_warning (PLUGIN_ID, "notify(), couldn't find any icon!\n");
+	}
+
+	g_signal_connect (notification, "closed", G_CALLBACK(closed_cb), NULL);
+
+	notify_notification_set_urgency (notification, NOTIFY_URGENCY_NORMAL);
+
+	/*notify_notification_add_action (notification, "show", _("Show"), action_cb, NULL, NULL);*/
+
+	if (!notify_notification_show (notification, NULL)) {
+		purple_debug_error (PLUGIN_ID, "notify(), failed to send notification\n");
+	}
+}
+
 static gboolean
 plugin_load (PurplePlugin *plugin)
 {
-	void *conv_handle, *blist_handle, *conn_handle;
+	void *conv_handle, *blist_handle, *conn_handle, *notify_handle;
 
 	if (!notify_is_initted () && !notify_init ("Pidgin")) {
 		purple_debug_error (PLUGIN_ID, "libnotify not running!\n");
@@ -482,6 +581,7 @@
 	conv_handle = purple_conversations_get_handle ();
 	blist_handle = purple_blist_get_handle ();
 	conn_handle = purple_connections_get_handle();
+  notify_handle = purple_notify_get_handle();
 
 	buddy_hash = g_hash_table_new (NULL, NULL);
 
@@ -501,6 +601,12 @@
 	purple_signal_connect (conn_handle, "signed-on", plugin,
 						PURPLE_CALLBACK(event_connection_throttle), NULL);
 
+  purple_signal_connect (notify_handle, "displaying-email-notification", plugin,
+            PURPLE_CALLBACK(notify_new_mail), NULL );
+
+  purple_signal_connect (notify_handle, "displaying-emails-notification", plugin,
+            PURPLE_CALLBACK(notify_new_mails), NULL );
+
 	return TRUE;
 }
 
@@ -528,6 +634,12 @@
 	purple_signal_disconnect (conn_handle, "signed-on", plugin,
 							PURPLE_CALLBACK(event_connection_throttle));
 
+  purple_signal_disconnect (conn_handle, "displaying-email-notification", plugin,
+              PURPLE_CALLBACK(notify_new_mail));
+
+  purple_signal_disconnect (conn_handle, "displaying-emails-notification", plugin,
+              PURPLE_CALLBACK(notify_new_mails));
+
 	g_hash_table_destroy (buddy_hash);
 
 	notify_uninit ();
