Hi Jeff, On Wed, May 06, 2020 at 05:17:42PM +0200, Jeff via gtk-perl-list wrote: > Hi Martin, > > On 05/05/2020 15:02, Martin Mézl wrote: > > This should work: > > > > use Glib; # But Glib is not necessary here > > use Glib::IO; > > > > # Glib::Object::Introspection is not needed > > > > my $uri = Glib->filename_to_uri($file, undef); # undef => no hostname > > my $context = Glib::IO::AppLaunchContext->new; > > > > Glib::IO::AppInfo::launch_default_for_uri($uri, $context); > > Oh yes. Very nice, thanks. > > Using $uri = 'mailto:x@y', I can start an email client. > > How can I add an attachment without resorting to xdg-email?
You can't: mailto URIs only allow header fields¹, which attachments are not, see https://tools.ietf.org/html/rfc6068#section-2 best regards, ¹ And you can't expect parsers to understand more than a few, as stated latter on the same RFC. -- Ricardo Mones ~ Don't take the name of root in vain. /usr/src/linux/README
signature.asc
Description: PGP signature
_______________________________________________ gtk-perl-list mailing list gtk-perl-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-perl-list