On Friday 21 December 2007 00:18:43 Mark Neyhart wrote:
Extend the MAILTO: string produced by the MAPISendMail function to include an attachment list. Because I was unable to find any standard for MAILTO regarding attachments, I constructed the attachment list in the format specified for Mozilla command line options.
Breaking other mail clients to gain attachments support for Mozilla is not acceptable tradeoff IMO.
-Hans
On Dec 21, 2007 2:36 AM, Hans Leidekker hans@it.vu.nl wrote:
On Friday 21 December 2007 00:18:43 Mark Neyhart wrote:
Extend the MAILTO: string produced by the MAPISendMail function to include an attachment list. Because I was unable to find any standard for MAILTO regarding attachments, I constructed the attachment list in the format specified for Mozilla command line options.
Breaking other mail clients to gain attachments support for Mozilla is not acceptable tradeoff IMO.
-Hans
Mozilla and Thunderbird do not support attachments via mailtos. At least not on Linux.
https://bugzilla.mozilla.org/show_bug.cgi?id=99055#c6
- Lei
On Dec 21, 2007 2:36 AM, Hans Leidekker hans@it.vu.nl wrote:
On Friday 21 December 2007 00:18:43 Mark Neyhart wrote:
Extend the MAILTO: string produced by the MAPISendMail function to include an attachment list. Because I was unable to find any standard for MAILTO regarding attachments, I constructed the attachment list in the format specified for Mozilla command line options.
Breaking other mail clients to gain attachments support for Mozilla is not acceptable tradeoff IMO.
-Hans
Mozilla and Thunderbird do not support attachments via mailtos. At least not on Linux.
https://bugzilla.mozilla.org/show_bug.cgi?id=99055#c6
- Lei
Hans, As the code stands right now, attachments are not supported at all. Using the MAPISendMail function with a file list will bring up an email client with no file(s) attached. This seems to be absolutely useless, since the file(s) will have to be manually attached before sending the message. This patch will provide at least the possibility for email clients to make use of the added parameter.
How about if I use the &attachment= parameter only if a file list is provided by the caller to MAPISendMail? That way applications which are not attempting to provide attachments will work the same way as before.
Lei, I am aware that Mozilla and Thunderbird do not support attachments via mailto. I resolved that with a simple wrapper which changes the mailto option into the standard command line options which do support attachments. The wrapper name can be specified the wine registry.
On Dec 21, 2007 10:06 AM, Mark Neyhart Mark_Neyhart@legis.state.ak.us wrote:
Lei, I am aware that Mozilla and Thunderbird do not support attachments via mailto. I resolved that with a simple wrapper which changes the mailto option into the standard command line options which do support attachments. The wrapper name can be specified the wine registry.
Your script is probably unnecessary, since there's already a tool for Linux email integration called xdg-email. It doesn't support attachments for Thunderbird yet, but I already submitted a patch. [1]
You should specify the attachment file names as /path/to/file, which is the format supported by xdg-email and every other Linux mail client, rather than file:///path/to/file, which doesn't work for anything but your script.
- Lei
Lei Zhang wrote:
On Dec 21, 2007 10:06 AM, Mark Neyhart Mark_Neyhart@legis.state.ak.us wrote:
Lei, I am aware that Mozilla and Thunderbird do not support attachments via mailto. I resolved that with a simple wrapper which changes the mailto option into the standard command line options which do support attachments. The wrapper name can be specified the wine registry.
Your script is probably unnecessary, since there's already a tool for Linux email integration called xdg-email. It doesn't support attachments for Thunderbird yet, but I already submitted a patch. [1]
You should specify the attachment file names as /path/to/file, which is the format supported by xdg-email and every other Linux mail client, rather than file:///path/to/file, which doesn't work for anything but your script.
- Lei
I just used the URI style because that is what Mozilla uses on the command line, but if that is an uncommon usage it makes sense to use /path/to/file instead. I also surrounded the attachment file list with single quotes as per the Mozilla specification. I should probable get rid of those as well. The attachment portion of the mailto string will change from
&attachment="'file:///path/to/file1,file:///path/to/file2'" to &attachment="/path/to/file1,/path/to/file2"
On Friday 21 December 2007 19:06:03 Mark Neyhart wrote:
How about if I use the &attachment= parameter only if a file list is provided by the caller to MAPISendMail? That way applications which are not attempting to provide attachments will work the same way as before.
I don't think that's any better. In this case, when there's an attachment, mail clients will choke on your non-standard mailto url and fail silently, which is worse than showing up without attachments.
How about adding an --attach option to winebrowser and replacing the ShellExecute call with CreateProcess? I.e. make MAPISendMail fetch the preferred mail client from the registry and start it with the mailto url on the command line. If it's winebrowser and if there are attachments, add them through the --attach parameter.
-Hans
Hans Leidekker wrote:
On Friday 21 December 2007 19:06:03 Mark Neyhart wrote:
How about if I use the &attachment= parameter only if a file list is provided by the caller to MAPISendMail? That way applications which are not attempting to provide attachments will work the same way as before.
I don't think that's any better. In this case, when there's an attachment, mail clients will choke on your non-standard mailto url and fail silently, which is worse than showing up without attachments.
How about adding an --attach option to winebrowser and replacing the ShellExecute call with CreateProcess? I.e. make MAPISendMail fetch the preferred mail client from the registry and start it with the mailto url on the command line. If it's winebrowser and if there are attachments, add them through the --attach parameter.
-Hans
This makes sense to me. I do have a couple of questions.
Can you refer me to examples of command line parameter parsing which I could use in winebrowser?
Are you referring to registry key [Software\Classes\mailto\shell\open\command] as the preferred mail client?
Should I replace the ShellExecuteA call with CreateProcessA only when I have attachments or in all cases?
On Friday 21 December 2007 22:54:35 Mark Neyhart wrote:
Can you refer me to examples of command line parameter parsing which I could use in winebrowser?
Many apps under programs/ do command line parsing. Look at winepath for example, which handles both long and short options.
Are you referring to registry key [Software\Classes\mailto\shell\open\command] as the preferred mail client?
Yes.
Should I replace the ShellExecuteA call with CreateProcessA only when I have attachments or in all cases?
ShellExecute does elaborate argument expansion that you don't want to duplicate so it's probably best to just make an exception when there are attachments and winebrowser is the preferred client.
-Hans
Lei Zhang wrote:
On Dec 21, 2007 2:36 AM, Hans Leidekker hans@it.vu.nl wrote:
On Friday 21 December 2007 00:18:43 Mark Neyhart wrote:
Extend the MAILTO: string produced by the MAPISendMail function to include an attachment list. Because I was unable to find any standard for MAILTO regarding attachments, I constructed the attachment list in the format specified for Mozilla command line options.
Breaking other mail clients to gain attachments support for Mozilla is not acceptable tradeoff IMO.
-Hans
Mozilla and Thunderbird do not support attachments via mailtos. At least not on Linux.
https://bugzilla.mozilla.org/show_bug.cgi?id=99055#c6
- Lei
Mozilla Mail and Thunderbird do not support mail attachments through the methods used by other mail clients and the Thunderbird team plans on not fixing this (the bug above should be closed as WONTFIX if I remember correctly from my work with OpenOffice.org for the Mac.)
Thus creating a patch for this method is worthless for both Thunderbird as it may/may not work with the next major release and will not work with any other Linux/Mac mail program (Mail for the Mac works in the same manner as does most Linux mailers.)
Mailto: does work for Outlook and its ilk.
James McKenzie