Closed p5pRT closed 6 years ago
Perlbug should offer a mailto link with the subject and body in the mailto url and run it through the GUI shell/a browser. See attached pic of how it works on windows. That Outlook Express window isn't configured to send mail on that PC\, but on another PC I have a regular mail client that does send mail. Notice the double quotes didn't work\, and the &s had to be escaped with win32's cmd line escape character which is ^. But this would improve the experience of perlbug on win32 and maybe some other platforms. start command is windows specific\, google says "open" on OSX and |gnome-open on Linux are equivelents. I assume the interface will be an option parallel to "send"\, or underneath "send" as a yes or no\, or automatically if sendmail fails.
----------------------------------------- You have finished composing your message. At this point\, you have a few options. You can:
* [Se]nd the message to perlbug@perl.org and sd\, * [D]isplay the message on the screen\, * [R]e-edit the message * Display or change the message's [su]bject * Save the message to a [f]ile to mail at another time * [Q]uit without sending a message
Action (Send/Display/Edit/Subject/Save to File): send
Are you certain you want to send this message?
Please type "yes" if you are [no]: yes It appears that there is no program which looks like "sendmail" on your system and that the Mail::Send library from CPAN isn't available.
Because of this\, there's no easy way to automatically send your message.
A copy of your message has been saved in 'C:\WINDOWS\TEMP\zzXuwo1cZJ' for you to send to 'perlbug@perl.org' with your normal mail client.
C:\perl519\bin\perlbug.bat has detected an error while trying to send your message: .
Your message may not have been sent. You will now have a chance to save a copy to disk.
Name of file to save message in [perlbug.rep]: --------------------------------------------- |
[perlbug win32 mailto.PNG](https://rt-archive.perl.org/perl5/Ticket/Attachment/1286062/678598/perlbug win32 mailto.PNG)
On Mon Mar 31 19:12:11 2014\, bulk88 wrote:
Perlbug should offer a mailto link with the subject and body in the mailto url and run it through the GUI shell/a browser. See attached pic of how it works on windows. That Outlook Express window isn't configured to send mail on that PC\, but on another PC I have a regular mail client that does send mail. Notice the double quotes didn't work\, and the &s had to be escaped with win32's cmd line escape character which is ^. But this would improve the experience of perlbug on win32 and maybe some other platforms. start command is windows specific\, google says "open" on OSX and |gnome-open on Linux are equivelents. I assume the interface will be an option parallel to "send"\, or underneath "send" as a yes or no\, or automatically if sendmail fails.
It's an interesting idea.
From some searching it appears that xdg-open is preferred over gnome-open now - since it works outside of gnome.
Testing locally\, xdg-open ran mutt twice (first in my current terminal\, then in a new terminal) while gnome-open only ran it once (in a new terminal) when I set mutt as my mail client. And didn't send the mail.
So I don't think it should be an automated fallback\, but an explicitly selected option.
Of course\, it won't help when their mail client isn't setup (like Evolution for me on Linux\, or Mail on OS X).
Tony
The RT System itself - Status changed from 'new' to 'open'
On Tue Apr 15 17:25:02 2014\, tonyc wrote:
On Mon Mar 31 19:12:11 2014\, bulk88 wrote:
Perlbug should offer a mailto link with the subject and body in the mailto url and run it through the GUI shell/a browser. See attached pic of how it works on windows. That Outlook Express window isn't configured to send mail on that PC\, but on another PC I have a regular mail client that does send mail. Notice the double quotes didn't work\, and the &s had to be escaped with win32's cmd line escape character which is ^. But this would improve the experience of perlbug on win32 and maybe some other platforms. start command is windows specific\, google says "open" on OSX and |gnome-open on Linux are equivelents. I assume the interface will be an option parallel to "send"\, or underneath "send" as a yes or no\, or automatically if sendmail fails.
It's an interesting idea.
From some searching it appears that xdg-open is preferred over gnome- open now - since it works outside of gnome.
Testing locally\, xdg-open ran mutt twice (first in my current terminal\, then in a new terminal) while gnome-open only ran it once (in a new terminal) when I set mutt as my mail client. And didn't send the mail.
So I don't think it should be an automated fallback\, but an explicitly selected option.
Of course\, it won't help when their mail client isn't setup (like Evolution for me on Linux\, or Mail on OS X).
Tony
bulk88\,
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.
-- James E Keenan (jkeenan@cpan.org)
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://perlbug@perl.org?subject=kjjh%20kuh^&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 https://blogs.msdn.microsoft.com/ieinternals/2014/08/13/url-length-limits/ "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 hotmail.com
On Sun\, 22 Jan 2017 13:38:50 -0800\, bulk88 wrote:
I wrote a crude patch that uses URI::Escape (not core!!!!).
POF Patch attached.
-- bulk88 ~ bulk88 at hotmail.com
Although this is an interesting idea\, it sounds as though the length issue is prohibitive. To put a whole perlbug message body in a mailto URI is certainly stretching the concept of that URI scheme\, and I'm not surprised that such long URIs wouldn't work in practice. It was worth the experiment\, though.
Since no one has actually managed to make this work\, I think we can declare this unworkable\, and should close the ticket.
-zefram
@cpansprout - Status changed from 'open' to 'rejected'
Migrated from rt.perl.org#121553 (status was 'rejected')
Searchable as RT121553$