--- nautilus-sendto-0.12-old/src/plugins/thunderbird.c	2007-03-12 14:38:16.000000000 +0100
+++ nautilus-sendto-0.12/src/plugins/thunderbird.c	2007-03-12 14:43:44.000000000 +0100
@@ -37,7 +37,7 @@
	printf ("Init thunderbird plugin\n");
	hash = g_hash_table_new (g_str_hash, g_str_equal);

-	t_cmd = g_find_program_in_path ("mozilla-thunderbird");
+	t_cmd = g_find_program_in_path ("thunderbird");
	if (t_cmd == NULL)
		return FALSE;
	return TRUE;
@@ -58,34 +58,40 @@
 gboolean send_files (NstPlugin *plugin, GtkWidget *contact_widget,
 			GList *file_list)
 {
-	gchar *t_cmd, *cmd, *send_to;
+	gchar *t_cmd, *cmd, *send_to, *file;
 	GList *l;
-	GString *mailto;
-
+	GString *attach;
+	
 	send_to = (gchar *) gtk_entry_get_text (GTK_ENTRY(contact_widget));
-		
+	t_cmd = g_find_program_in_path ("thunderbird");
+	if (t_cmd == NULL)
+		return FALSE;
+
+	attach = g_string_new ("");	
+	file = g_filename_from_uri (file_list->data, NULL, NULL);
+	if (file != NULL) {
+		g_string_append_printf (attach,"%s",file_list->data);
+	}
+	else {
+		g_string_append_printf (attach,"file://%s",file_list->data);
+	}
+
+	for (l = file_list->next ; l; l=l->next){				
+		g_string_append_printf (attach,",%s",l->data);
+	}
+
 	if (send_to == NULL || strlen (send_to) == 0)
 	{
-		mailto = g_string_new("-compose ");
+		cmd = g_strdup_printf ("%s -compose \"attachment='%s'\"", t_cmd, attach->str);
 	}
 	else
 	{
-		mailto = g_string_new("-compose ");
-		g_string_append_printf (mailto, "to=%s,", send_to);		
-	}
-	
-	t_cmd = g_find_program_in_path ("mozilla-thunderbird");
-	if (t_cmd == NULL)
-		return FALSE;
-	
-	g_string_append_printf (mailto," attachment='\"%s\"'",file_list->data);
-	for (l = file_list->next ; l; l=l->next){				
-		g_string_append_printf (mailto,",'\"%s\"'",l->data);
+		cmd = g_strdup_printf ("%s -compose to=%s,\"attachment='%s'\"", t_cmd, send_to, attach->str);
 	}
-	cmd = g_strdup_printf ("%s %s", t_cmd, mailto->str);
 	g_spawn_command_line_async (cmd, NULL);
 	g_free (cmd);
-	g_string_free (mailto, TRUE);
+	g_free (file);
+	g_string_free (attach, TRUE);
 	g_free (t_cmd);
 	return TRUE;
 }
--- nautilus-sendto-0.12-old/configure	2006-11-02 18:01:01.000000000 +0100
+++ nautilus-sendto-0.12/configure	2006-11-02 22:48:41.000000000 +0100
@@ -20633,7 +20633,7 @@
 
 
 
-enable_thunderbird=no
+enable_thunderbird=yes
  if test "x$enable_thunderbird" = "xyes"; then
   HAVE_THUNDERBIRD_TRUE=
   HAVE_THUNDERBIRD_FALSE='#'
