develooper Front page | perl.perl5.porters | Postings from January 2017

[perl #121553] perlbug should offer to execute a mailto link

bulk88 via RT
January 22, 2017 21:39
[perl #121553] perlbug should offer to execute a mailto link
Message ID:
On Mon, 05 Oct 2015 19:23:56 -0700, jkeenan wrote:
> I reviewed this older ticket this evening.  TonyC provided some
> feedback in April 2014, but it doesn't appear there has been any
> further correspondence.
> If you want to pursue this, could you prepare a patch?
> Thank you very much.

I wrote a crude patch that uses URI::Escape (not core!!!!). There is 1 minor limit of mailto URL spec, no HTML, no MIME, no attachment, but perlbug doesnt generate attachments by default anyway (arbitrary user speced only). I did find another limit, there is a truncation/buffer size bug somewhere. The URL generated works fine if I copy paste it into Seamonkey 2.46's URL bar. BUT if I do system('start mailto://') or copy paste the "start mailto://" into cmd.exe, or paste the mailto:// URL into Win7 explorer's URL bar, the email body is truncated around 2015-2040 byte mark (the "byteorder" variable in the perlbug email). This 2KB limit is AFTER percent escaping, so the email body in the Seamonkey composer is actually 1280 bytes long. A

perl -e" print \"\n\n\n\n\n\n\n\".$ARGV[0]" mailto://^&body=This%20is%20a%20bug%20report%20for%20perl%20from.......................

shows the full URL in STDOUT, so its not a shell bug, it is a Seamonkey or somewhere else in Windows bug. I am thinking possibly adding a "start %TEMP%/YsTDFrLJ.eml" or something, or using Win32 MAPI and WSH (MAPI is COM based, and because no Win32::OLE in core, use WSH VB/JS somehow to launch the compose window in a C-free solution).

Possibly related link "On Windows 8.1, for instance, if you directly pass a 4k Application Protocol URL to ShellExecute in native code, the URL is silently truncated at the 2083 character mark."

bulk88 ~ bulk88 at

via perlbug:  queue: perl5 status: open Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About