You are currently viewing a snapshot of www.mozilla.org taken on April 21, 2008. Most of this content is highly out of date (some pages haven't been updated since the project began in 1998) and exists for historical purposes only. If there are any pages on this archive site that you think should be added back to www.mozilla.org, please file a bug.



altmail

"mozilla without mailnews"
sspitzer@mozilla.org

The goal of this project is to allow mozilla to work with the default mail/news and addressbook applications, instead of mozilla mail/news.

We'd have to add mozilla/altmail.  We'd make it so if you built with DISABLE_MAILNEWS, and ENABLE_ALTMAIL you should end up with a mozilla app with all the current mail/news hooks in browser, composer, etc.  But the hooks would launch the default mail/news or addressbook applications.

The current UI hooks:
  • mail icon in the task bar
  • addressbook icon in the task bar
  • "file | new | message" in browser
  • "file | send page" or "file | send link" (we might be able to implement these with mailto: urls)
  • "tools | search | messages"
  • "tools | search | addresses"
  • "window | mail and newsgroups"
  • "window | addressbook"
  • biff changes the mail icon in the task bar.
  • (maybe more)
Questions:
  • Is MAPI 0 support the place to start?
  • Do we want all the current UI hooks?
  • What about the existing mailto: override pref?
The MAPI support we currently have in mozilla is to allow us to be launched from other apps

For mailto: on win32, I think all you have to do is define "network.protocol-handler.external.mailto" as true in your prefs.

That will launch your the application that is registered as the default mail application.

It doesn't work for all platforms (like linux), because nsOSHelperAppService::ExternalProtocolHandlerExists() and nsOSHelperAppService::LoadUrl() are not implemented.

Note, "File | Send Page" does not appear in browser installed without mozilla mail.  We probably want to change that.  Just like IE has UI to launch the default mail app, and to do File | Send Page, we want that too.

Something that mscott and I recently discussed was adding to the nsIExternalProtocolService.idl interface:

void launchApp(in string aName, in string aArgs);

Examples:

extProtocolHander.launchApp("browser", "http://www.yahoo.com");
extProtocolHander.launchApp("mailcompose", "mailto:sspitzer@mozilla.org?subject=foo");
extProtocolHander.launchApp("mailcompose", "");
extProtocolHander.launchApp("mail", "");
extProtocolHander.launchApp("addressbook", "");

In the per platform implementations, like mozilla/uriloader/exthandler/win/nsOSHelperAppService.cpp, we'd decide how to launch these apps.

On windows, we might use MAPI to launch the default app.  If we didn't want to launch the default application, we could use the windows registry to a path to another app, and do ::ShellExecute().  According to some docs on microsoft.com, there are registry entries for default mail, news, browser, calendar, html composers, etc.

As far as adding the UI hooks back to stand alone browser in 7.0, see http://lxr.mozilla.org/mozilla/source/mailnews/base/resources/content/mailTasksOverlay.xul

For now see http://bugzilla.mozilla.org/show_bug.cgi?id=34819