Re: how to make desktop app send email?
- From: linas linas org (Linas Vepstas)
- To: Mark McLoughlin <markmc redhat com>
- Cc: Maciej Katafiasz <mnews22 wp pl>, Federico Mena Quintero <federico ximian com>, Desktop Devel <desktop-devel-list gnome org>, Linas Vepstas <linas linas org>
- Subject: Re: how to make desktop app send email?
- Date: Fri, 16 Jul 2004 09:17:32 -0500
On Fri, Jul 16, 2004 at 06:58:44AM +0100, Mark McLoughlin was heard to remark:
> On Fri, 2004-07-16 at 03:49, Maciej Katafiasz wrote:
> > W li??cie z pi??, 16-07-2004, godz. 03:55, Federico Mena Quintero pisze:
> > > On Thu, 2004-07-15 at 12:58 -0500, Linas Vepstas wrote:
> > >
> > > > I have a desktop app ("gnomtime", actually, gttr.sourceforge.net) with
> > > > several free-text areas in it. It like to be able to add a menu item
> > > > that says "email this". Clicking on the menu would start the user's
> > > > favorite email client, push the text into it, and let them complete
> > > > the addressing from there, etc.
> > > >
> > > > What's the best way of doing this?
> > >
> > > - evolution mailto:foo bar com?subject=Hello World&body=Good bye&
> > > - a CORBA interface for the composer
> > but it's completely evolution specific.
> > g_spawn_command_line_async ("gnome-open mailto:foo bar", &err);
> gnome_url_show ("mailto:foo bar", &err);
> would be better.
The hard part to find out what the user's favorite MUA was, from
the desktop registry/gconf entry/KDE config-whatever that would
hold this info. (That's why this is a desktop question).
Although it would be nice to email something with only one or two
subroutine calls, a la gnome_url_show(), I'm willing, as a programmer,
to write hundreds of app-specific lines of code, some for evolution,
some for kmail/aethera, some for mutt, *if* I knew what the users favorite
MUA was. I'm willing to overcome adversity; these few hundred lines
of code would be in my app, where I have total power & control,
and so its "easy".
The hard part is this fuzzy area of desktop preferences, HIG guidelines,
configurabilility/config dialogs, lists of default mime-type handlers
... debian /etc/alternatives, except there's no /etc/alternatuives/mua
in debian (much less other distro's). I don't know where or how to
write the hundreds of lines of code to fish out the prefered user MUA
from wherever it is stored....
pub 1024D/01045933 2001-02-01 Linas Vepstas (Labas!) <linas linas org>
PGP Key fingerprint = 8305 2521 6000 0B5E 8984 3F54 64A9 9A82 0104 5933
] [Thread Prev