After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 510800 - Selecting mozilla-thunderbird as the preferred mail app still launches evolution
Selecting mozilla-thunderbird as the preferred mail app still launches evolution
Status: RESOLVED FIXED
Product: nautilus-sendto
Classification: Applications
Component: general
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: nautilus-sendto-maint
nautilus-sendto-maint
Depends on:
Blocks: 318052 532193
 
 
Reported: 2008-01-20 14:04 UTC by Bastien Nocera
Modified: 2010-12-07 16:35 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Bastien Nocera 2008-01-20 14:04:09 UTC
+++ This bug was initially created as a clone of Bug #318052 +++

Version details: 0.4
Distribution/Version: Ubuntu Breezy

Forwarded from: http://bugzilla.ubuntu.com/show_bug.cgi?id=17103

I access System --> Preferences --> Preferred Applications. I select the Mail
Reader tab. I select custom. I enter the following :
/usr/bin/mozilla-thunderbird, and then I close the Preferred Applications
applet. Now when I go to Nautilus and right-click with the mouse on a file and
select Send To... I still get Evolution showing up as the default mailer.



The preferred applications should set a key in GConf to explain the syntax to launch the mailer with attachments.
Comment 1 Thomas Wood 2008-04-18 22:40:08 UTC
The default mailto command handled is stored in the following GConf key:

/desktop/gnome/url-handlers/mailto


What extra information do you need?
Comment 2 Bastien Nocera 2008-04-25 12:24:41 UTC
(In reply to comment #1)
> The default mailto command handled is stored in the following GConf key:
> 
> /desktop/gnome/url-handlers/mailto
> 
> 
> What extra information do you need?

From comment 0:
> The preferred applications should set a key in GConf to explain the syntax to
> launch the mailer with attachments.

Mailers handle mailto: urls differently when it comes to attachments, and nautilus-sendto has no way to guess those.
Comment 3 Thomas Wood 2008-04-25 16:49:17 UTC
Ok, understood.

Could you attach some examples of how different applications handle this? We can then add this data to the XML file of known applications, and write the appropriate value to a gconf key when a known mailer is selected.
Comment 4 Bastien Nocera 2008-04-25 17:47:50 UTC
With '%e' being the e-mail of the destination, %f being the attachment(s)

Balsa and Sylpheed:
balsa --compose="%e" attach="%f" "%f" "%f"...
Evolution:
evolution-${version} mailto:"%e"?attach="%f"&attach="%f"...
Thunderbird:
thunderbird -compose to="%e",attachment=%f,%f...

What I would be thinking of to split this up is in GConf entries:
- command
- mail contact
- attachment #1 [details]
- subsequent attachments

For example:
* evolution
mailto:"%s"
?attach="%s"
&attach="%s"

* balsa and sylpheed
balsa
" --compose=\"%s\""
" attach=\"%s\""
" \"%s\""

* Thunderbird
thunderbird
" -compose to=\"%s\""
,attachment=%s
,%s

And all the commands could be concatenated with (in pseudo code):
str = g_string_new ("");
g_string_append_printf (str, contact_str, email);
g_string_append_printf (str, first_attachment_str, first_attachment);
for (i in attachments+1)
  g_string_append_printf (str, first_attachment_str, i);
Comment 5 Bastien Nocera 2010-12-07 16:35:54 UTC
I actually reworked the code in nautilus-sendto some time ago to have custom code for each mailer, so this code isn't needed any more.