From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Moe Subject: Re: mailto link with a subject and a content Date: Fri, 16 Jan 2015 09:23:23 +0100 Message-ID: References: <87iog7le36.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49426) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YC29K-0003rD-4t for emacs-orgmode@gnu.org; Fri, 16 Jan 2015 03:20:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YC29G-0001s4-OR for emacs-orgmode@gnu.org; Fri, 16 Jan 2015 03:20:58 -0500 Received: from mail2.b1.hitrost.net ([91.185.211.205]:49523) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YC29G-0001qn-Ed for emacs-orgmode@gnu.org; Fri, 16 Jan 2015 03:20:54 -0500 In-reply-to: <87iog7le36.fsf@ericabrahamsen.net> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Eric Abrahamsen Cc: frederic-emmanuel.picca@synchrotron-soleil.fr, emacs-orgmode@gnu.org Hi, This works fine for me with mu4e as the mail client. It's not guaranteed to work with every client, but it can be a solution for personal use. It's not necessarily the best solution. The general syntax is mailto:address?subject=text&body=text Some applications even allow adding attachments the same way (...&attachment=...), but mu4e doesn't seem to. If you keep everything on one line and in a bracketed link, you don't even have to worry about replacing spaces with "%20": [[mailto:who@where.org?subject=Some words&body=Some more words]] But it's probably recommendable to URL-encode spaces and punctuation, and I find it's necessary if you have newlines. You can use the url-encode-url function for this. So the OP's example would be: [[mailto:submit@bugs.debian.org?subject=%20My%20problem%20with%20hkl...&body=Package:%20hkl%0AVersion:%20@VERSION@%0A%0AI%20found%20this%20problem%20in%20hkl...]] (The brackets are needed if you actually want to keep the trailing dots.) Yours, Christian Eric Abrahamsen writes: > PICCA Frederic-Emmanuel > writes: > >> Hello, I would like to create a link (exported as html) which allow to prefill the content of the emai when we click on it. >> >> Something like >> >> To: submit@bugs.debian.org >> Subject: My problem with hkl... >> >> Package: hkl >> Version: @VERSION@ >> >> I found this problem in hkl... >> >> Is it possible to do this kind of things with org-mode ? > > I think mailto: link syntax comes with GET-style parameters that allow > prefilling of some headers, ie > "mailto:someone@address.com?subject=BugReport", but that's pretty > limited. John's right that if what you want is the above, you should > probably just write some function to do it. > > Incidentally, when I just tried to test the above, org would only send > the link to Conkeror, instead of opening in Gnus. Dunno what's going on > there. > > Eric