Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Use an external mail app with Mozilla mailto links Web Browsers
I found this hint on Mozilla's bug tracker (bugzilla), listed as bug #11459. Within this bug, you'll find comment #72:
I'm not sure if this applies to all builds of Mozilla or just the Mac OS X build, but adding a file called user.js to your profile folder (the same folder which contains prefs.js) and placing the following text in that file will fix this bug:
user_pref("network.protocol-handler.external.mailto", true);
From what I understand, this also works for ftp and nntp. This was pointed out to me by someone in the netscape.public.mozilla.macosx newsgroup.
Save the file as a plain text file, and place it in your Mozilla profile folder (buried in your Library -> Mozilla -> Profiles -> username -> some_mess.slt directory). Now quit and relaunch Mozilla, and voila, mailto links open with you default mail client.

[Editor's note: Try as I might, I could not make this work on my Mozilla installation (20020417 nightly). I tried just about everything I could think of - made sure that the Internet pref pane had my preferred client and account info, changed the user.js "Open With" to match the existing prefs.js (which points to Classic Communicator?), cut and pasted the source from the bugzilla page to eliminate typos, etc. All that I've succeeded in doing is disabling mailto: links all together ... is anyone else able to get this working?]
    •    
  • Currently 2.33 / 5
  You rated: 3 / 5 (9 votes cast)
 
[46,022 views]  

Use an external mail app with Mozilla mailto links | 22 comments | Create New Account
Click here to return to the 'Use an external mail app with Mozilla mailto links' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Works OK...
Authored by: Monkey Angst on May 02, '02 10:37:32AM

Working OK for me with Mozilla 1.0 RC1.



[ Reply to This | # ]
Working for me . . .
Authored by: Anonymous on May 02, '02 01:08:17PM

It's working fine for me, for both mailto and ftp, with Mozilla 1.0 RC1. I suggest not trying to do this for nntp, as that will likely crash Mozilla if you open the mail/news component. But for me, this redirects mailto links to Mail.app, while keeping all the funtionality of the Mozilla newsreader, allowing me to post messages to newsgroups. Rob, try with the RC1, maybe they're tinkering with this functionality in the nightly builds. . .



[ Reply to This | # ]
worked for me in 'prefs.js' file...
Authored by: josephaw on May 02, '02 02:34:17PM

I wasn't sure if I was supposed to put this in the 'prefs.js' or a new user.js file. Anyway the user.js didn't work.
So I put it in the 'prefs.js' file right below the last 'user_pref("network.' line.
I think they are grouped together so make sure it goes in the right place.
'Mozilla 2002041712'
Thank you OSX Hints.
JosephAW



[ Reply to This | # ]
prefs.js vs user.js
Authored by: a1291762 on May 02, '02 07:22:08PM

> I wasn't sure if I was supposed to put this in the 'prefs.js' or a new user.js
> file. Anyway the user.js didn't work.

Hmm...

I think that "officially", you are supposed to change user.js, not prefs.js. This is because prefs.js is changed by Mozilla but user.js isn't.
(eg. if you disable popups in user.js, you can't enable them from the GUI)

I don't know why it didn't work in user.js... did you restart Mozilla? Are your line endings correct? (Should be unix I think).



[ Reply to This | # ]
prefs.js vs user.js
Authored by: Anonymous on May 02, '02 11:14:36PM

it just needs to be plain text. You can use Text Edit, but you must be in Plain Text mode (in the Format menu), not the default rtf mode.



[ Reply to This | # ]
Nightly Build Works
Authored by: Alex281 on May 02, '02 02:35:38PM

Works for me with the newest nightly build, build id 2002050208



[ Reply to This | # ]
works with ftp too
Authored by: metiure on May 02, '02 02:38:34PM

i replicated the user instructions with the ftp protocol and now Mozilla runs Fetch when i click a FTP link!
Great!
When will these guys bring us a final version? I can't wait!



[ Reply to This | # ]
does not work with ftp too :(
Authored by: mittrawnuruodo on May 02, '02 06:04:38PM

i got it working fine with eudora (which is my default mail client)...
so i tried to make another line with ftp instead of mailto, but now absolutely nothing happens when i click on a ftp:// link...
how do i "tell" mozilla that fetch is my default ftp client...???



[ Reply to This | # ]
does not work with ftp too :(
Authored by: Anonymous on May 02, '02 06:21:19PM

Open up Fetch, then go to the Customize menu, and select the "Make Fetch the Internet Config FTP Helper" item in the "Fetch as FTP Helper" submenu. There you go.



[ Reply to This | # ]
What about Netscape 6.2.2?
Authored by: slaven41 on May 04, '02 07:06:31PM

Will this work with Netscape 6.2.2, or is this strictly a Mozilla thing? I've tried it with N622 since it has the same prefs folder and all that, but can't seem to get it working. Sigh.

Dave



[ Reply to This | # ]
What about Netscape 6.2.2?
Authored by: pukku on Oct 23, '02 10:28:32PM

I'm not sure about 6.2.2, but with Netscape 7, it seems to work...



[ Reply to This | # ]
Thanks
Authored by: asxless on May 05, '02 07:55:17AM

Thanks for a great tip that makes using Mozilla as my main browser even more enjoyable.

asxless in iLand



[ Reply to This | # ]
Works great with RC2 and Entourage
Authored by: twalkabout on May 23, '02 04:05:22PM

I just used Simple Text, and this worked perfectly. Very cool.



[ Reply to This | # ]
I think I found the key...
Authored by: fdan48 on Jun 10, '02 12:27:25PM

I tried for a while without success to get this to work. That is, until I followed the link back to bugzilla and read the full message. There were two other lines that should be included. The user.js file should contain all three of the following lines:

user_pref("network.protocol-handler.external.mailto", true);
user_pref("applications.mailto", "Microsoft Entourage");
user_pref("applications.mailto.host", "%username%@%host%");

Once I added the additional two lines it worked great. I presume you could replace Entourage with your favorite mail program. I think this because I put Entourage in place of what was originally in the bugzilla comment (some unix program).

It is recommended to put it in user.js instead of prefs.js because mozilla "may" modify the pref.js file without warning, whereas user.js is designed for users to set their own preferences that won't be modified by mozilla.



[ Reply to This | # ]
re: Use an external mail app with Mozilla mailto links
Authored by: joedec on Sep 08, '02 01:39:20PM

This works great. I'm running Mozilla V1.1 and Jaguar.
My user.js file was created opens by default with BBEdit.

$ file user.js
user.js: ASCII text
$ cat user.js
user_pref("network.protocol-handler.external.mailto", true);

All mailto links now open MS Entourage, defined in System Preferences.

See http://www.mozilla.org/start/1.0/faq/mail-news.html#3.3

... Jeff Smith



[ Reply to This | # ]
Works with Netscape
Authored by: jspease on Nov 26, '02 04:44:05PM

I applied this hint for Netscape, and it worked like a charm! Much easier than removing shared libraries (which I had done previously to get the same result).



[ Reply to This | # ]
Works with Netscape
Authored by: jxpx777 on Aug 29, '04 01:53:45AM

I finally got it to work in Netscape 7 after I figured out that it was in my User Library and not Library in the root directory. Thick headed late at night.



[ Reply to This | # ]
Use an external mail app with Mozilla mailto links
Authored by: xbryanx on Mar 16, '03 11:15:02AM

works great for me on 10.2.4 and moz 1.3



[ Reply to This | # ]
Use an external mail app with Mozilla mailto links
Authored by: carsten on Mar 17, '03 03:59:23AM
Eventually got it to work with Mail in 10.2.4, using Mozilla nightly build 2003030311:

user_pref("network.protocol-handler.external.mailto", true);
user_pref("applications.mailto", "/Applications/Mail.app");
user_pref("applications.mailto.host", "%username%@%host%");
Thanks, a great tip!

[ Reply to This | # ]
Use an external mail app with Mozilla mailto links
Authored by: ssevenup on Apr 09, '03 07:40:31PM

After one of my users complained about this earlier today, I looked for a way to solve this globally. Admittedly, altering the app bundle is a bit drastic, but for those interested in this for mass deployment here goes...

We needed to globally set Eudora as the default mail app for Camino and Mozilla (and probably Phoenix). Until it's addressed in the Mozilla code base, doing the following works for me.

As expressed before, create a user.js unix text file with...

user_pref("network.protocol-handler.external.mailto", true);
user_pref("applications.mailto", "Eudora.app");
user_pref("applications.mailto.host", "%username%@%host%");

Maybe the double quotes should be escaped but I found it worked without, and I didn't need the full path to Eudora. I then placed a copy of user.js in "Camino.app/Contents/MacOS/defaults/profile/" and "Mozilla.app/Contents/MacOS/defaults/profile/" and possibly "Mozilla.app/Contents/MacOS/defaults/profile/US/". I never verified which location was used in Mozilla or when, so I just made copies in both locations. This can be done in the Terminal or probably in the Finder with "Show Package Contents" (I didn't try). Now whenever a user is given a new OSX system where they have no default folder yet for Camino or Mozilla, the user.js gets put where it needs to be when the folder is created. This forces me to modify my browsers we install every time a new version arrives, but once the user is set up, they can then upgrade without issue, and it has no effect on users with existing profiles. I could also shell script the mod to the browser for when new versions arrive, but it's not that frequent and I should probably confirm that the structure has not changed anyway. I still want to see if just the first line of the user.js would give me whatever the Internet prefs are set to for Mail.

--MM



---
Mark Moorcroft
ELORET Corp. - NASA/Ames RC
Sys. Admin.



[ Reply to This | # ]
Use an external mail app with Mozilla mailto links
Authored by: slackrat on Feb 04, '04 11:37:22AM

I believe you can also browse to "about.config" and use Mozilla's interface for setting user preference key-value pairs. It saves your changes to prefs.js for you. Worked for me on Moz 1.5



[ Reply to This | # ]
Use an external mail app with Mozilla mailto links
Authored by: slackrat on Feb 04, '04 11:37:48AM

I believe you can also browse to "about:config" and use Mozilla's interface for setting user preference key-value pairs. It saves your changes to prefs.js for you. Worked for me on Moz 1.5



[ Reply to This | # ]