[Portland] xdg-email and web mail

Kevin Krammer kevin.krammer at gmx.at
Wed Feb 28 14:13:29 PST 2007


On Wednesday 28 February 2007 22:51, Claes H wrote:
> Hello,
>
> As far as I know, there is currently no support on any desktop for
> using webmail as default email composer (using a web browser).
> Personally that is what I prefer.
>
> With xdg-utils, it is now easier to add. Basically, you just have to
> call xdg-open with the correct url. The url has to be formatted as
> defined by the webmail provider. Some common url formats are described
> here:
>
> http://my.opera.com/Rijk/blog/show.dml/343966

Quite useful. Do you know if any of the webmail provider actually have this 
documented?
If the haven't this could change at any time.

> So the first thing that is needed is a program that can take and
> tranform arguments about recipient etc to a provider-url. Attached is
> a script that illustrates how this could work. The script transforms a
> mailto-url to a provider-url (Yahoo mail, Gmail and Hotmail supported)
> according to a format string, and then calls xdg-open with this url.
>
> However, now to the questions:
>
> This is strictly not the task for xdg-email, since it has to be
> applied after xdg-email, in a desktop-specific way. After all, it is
> the desktop that knows what the user's preferred email client is.

Ideally, yes.
Pratically we might have to replace delegating to the desktops with somwho 
extracting the information and reacting on it ourselves, since we already 
have a problem with Tunderbird, since it does not handle the common "attach" 
keyword for attachments but rather uses "attachment" :(

I really don't like this, the xdg-utils scripts were meant to be simple, not 
handle all possible border line cases.

> What support can xdg-utils provide to help with this, and is it even
> the right place? It would be nice if there was a uniform way for
> webmail providers to tell their customers, "if you use Linux, do like
> this to make yahoo/hot/gmail to your default email program"

My guess is that if they were interested in this, they would have a 
CGI/whatever that knows how to parse a mailto URI and any desktop would just 
have to recode a supplied mailto URI a little bit before calling the CGI's 
URL.

Maybe this is actually possible, just not documented.

> Basically I envision that they tell their customers to copy&paste a
> string into a configuration dialog. In Gnome it would be
> gnome-default-applications-properties, "Mail Reader, Custom Command",
> and in KDE the equivalent. The string would be a call to a xdg-util
> supplied utility that takes a provider-format and a mailto-url as
> argument.

If the desktops start calling xdg-utils, we'd get into a "nice" loop, wouldn't 
we? ;)

> In my script the provider format strings are hardcoded inside the
> script. I have not figured out how to supply such a string as argument
> to the script instead, and expand the shell variables inside after the
> variables have had their values assigned. That is neccessary to make
> it adaptable to any webmail provider.

Well, since the use of a shell script limits your options, you can basically 
supply the format strings as additional parameters in a pre-defined order, 
specifiy environment variables that have to be set, or make your script read 
information from standard input.

Cheers,
Kevin

-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/portland/attachments/20070228/c1e239a4/attachment.pgp


More information about the Portland mailing list