User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:22.214.171.124) Gecko/20091106 Mandriva Linux/126.96.36.199-0.1mdv2010.0 (2010.0) Firefox/3.5.5 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-UK; rv:1.9.3a1pre) Gecko/20091203 Shredder/3.1a1pre In TB188.8.131.52 Picasa 3 for Linux sends mail with multiple photo attachments correctly. In Shredder the compose window fails to open with an error dialog "An error occurred while creating a message compose window. Please try again." I have used the Picasa 3 "picasa-hook-email.sh" feature to write a script which does work around this, however it will only work with one attachment. See bug https://bugzilla.mozilla.org/show_bug.cgi?id=532725 # picasa-hook-email.sh #!/bin/sh #PATH_TO_TBIRD=/home/baz/thunderbird/thunderbird PATH_TO_TBIRD=mozilla-thunderbird echo $1 > /home/$USER/tmp/picasa.txt sed -i 's/mailto:?/to=,/' /home/$USER/tmp/picasa.txt sed -i 's/&cc=/,cc=/' /home/$USER/tmp/picasa.txt sed -i 's/&bcc=/,bcc=/' /home/$USER/tmp/picasa.txt sed -i 's/&body=/,body=/' /home/$USER/tmp/picasa.txt sed -i 's/&attach=/,attachment=file:\/\//g' /home/$USER/tmp/picasa.txt emailstr=$( cat /home/$USER/tmp/picasa.txt ) #rm /home/$USER/tmp/picasa.txt $PATH_TO_TBIRD -compose $emailstr Output from script using Picasa:- mozilla-thunderbird -compose to=,subject=2 pictures for you,cc=,bcc=,body=You have been sent 2 pictures. dcp_3004.jpg dcp_3005.jpg These pictures were sent with Picasa, from Google. Try it out here: http://picasa.google.com/,attachment=file:///home/baz/.google/picasa/3.0/dosdevices/c:/Documents and Settings/baz/Local Settings/Application Data/Google/Picasa2/temp/email/temp_132/dcp_3004.jpg,attachment=file:///home/baz/.google/picasa/3.0/dosdevices/c:/Documents and Settings/baz/Local Settings/Application Data/Google/Picasa2/temp/email/temp_132/dcp_3005.jpg Reproducible: Always Steps to Reproduce: 1.Set default email client in OS to Thunderbird. 2.Open Picasa 3 beta for Linux 3.Select two phoos to mail 4 Hit email button 5.Compose fails with error Using picasa-hook-email.sh :- 6 Put picasa-hook-email.sh in your path. Make it executable. 7 Check the PATH_TO_TBIRD var in script is correct 8 Repeat the send email from Picasa - it works but only adds one photo. Actual Results: Compose window fails to open Expected Results: Compose window should open with all attachments listed as it does in TB2
As suggested in your other bug, try "$emailstr" instead to prevent bash from interpreting any quotes or spaces. Interesting though that it works in 2.0.
Yes I will modify the script to correct the syntax, however it does work flawlessly without any intervening script in 2.0, Just what is passed to TB when the script is not found by Picasa I have no idea.
Dupe of bug 509643
(In reply to comment #3) > Dupe of bug 509643 > > *** This bug has been marked as a duplicate of bug 509643 *** No, this bug is NOT about syntax - it is about the regression from TB2 ! Steps to Reproduce: 1.Set default email client in OS to Shredder. 2.Open Picasa 3 beta for Linux 3.Select two photos to mail 4 Hit email button 5.Compose fails with error "An error occurred while creating a message compose window. Please try again." This works in TB 184.108.40.206
For the benefit of anyone searching this bug for a workaround until this bug is fixed, this hack works: Save the following as "picasa-hook-email.sh" and add it's location to your path in ~/.bash_profile #!/bin/sh #picasa-hook-email.sh # Edit the following line PATH_TO_TBIRD=mozilla-thunderbird tmpstr=/home/"$USER"/tmp/picasa.txt echo $1 > $tmpstr sed -i 's/mailto:?/to=,/' $tmpstr sed -i 's/&cc=/,cc=/' $tmpstr sed -i 's/&bcc=/,bcc=/' $tmpstr sed -i 's/&body=/,body=/' $tmpstr sed -i "s/&attach=/,attachment='file:\/\//" $tmpstr sed -i 's/&attach=/,file:\/\//g' $tmpstr emailstr=$( cat $tmpstr ) rm $tmpstr & quote="'" emailstr=$emailstr$quote $PATH_TO_TBIRD -compose "$emailstr" #End of picasa-hook-email.sh
If it works with double-quotes around "$emailstr" as suggested, that's the same with slightly different placement of the quotes as in bug 509643 comment #12. Thus, how do you think this bug differs from the other one? It appears to be an issue with the script not using quotes correctly.
No, forget the script, it is purely a workaround. The script is not needed in TB2. It just works as is. Picasa offers the script method as a facility to allow workarounds for oddball email clients that don't normally work with Picasa. Thunderbird DOES normally work AS IS with Picasa. Again this bug report is about the regression. Not the script or syntax. I wish I had not mentioned the script. Just REGRESSION - it works in TB2, it don't work in Shredder! Got it, get it, good! :-)
Ok, the confusion on my end was that you posted the command-line string from your script. The issue occurs apparently already before that, caused by how Picasa creates the call to Thunderbird. Can you post the original command line? Nevertheless, this should be the same as bug 509643, where the assumptions on the command-line strings made thus far there are apparently wrong.
(In reply to comment #8) > Can you post the original command line? I have no idea how Picasa calls Thunderbird normally. If I could intercept that then it would give a clue, but IT WORKS in TB2 so the call must be OK. TB has changed not Picasa. I even created a script "deadmail.sh" and made it my default email client and tried to mail using it to trap the output from picasa but it failed. I am no expert! :-/ Barry
Hi I just wanted to confirm the bug. I also wanted to add that the fix / script almost works here. I don't get the error anymore when clicking the E-Mail button and Mozilla Thunderbird 3 is coming up with Compose New Message window. However the files are not attached. All I get is this: [QUOTE] You have been sent 1 picture. Fotka 648.jpg These pictures were sent with Picasa, from Google. Try it out here: http://picasa.google.com/&attach=/home/andrzejl/.google/picasa/3.0/dosdevices/c:/Documents and Settings/andrzejl/Local Settings/Application Data/Google/Picasa2/temp/email/temp_17/Fotka 648.jpg [/QUOTE] I am using PCLinuxOS 2009.1 MiniMe with KDE 3.5.10 would that have any influence on how the script works? Regards. Keep up to good work. Andy
Not entirely sure which one of these packages fixed the issue but after installing them I rebooted and now Picasa + Thunderbird 3 + Script posted above (big kudos to the author) are playing nicely with each other. List of the packages: Upgraded the following packages: brasero (2.28.2-1pclos2010) to 2.28.3-1pclos2010 chromium-browser (220.127.116.11124-1pclos2010) to 4.0.269.34425-1pclos2010 docbook-dtd412-xml (1.0-19pclos2007) to 1.0-20pclos2010 docbook-dtd42-xml (1.0-6pclos2007) to 1.0-7pclos2010 docbook-dtd43-xml (1.0-4pclos2007) to 1.0-5pclos2010 docbook-dtd44-xml (1.0-2pclos2007) to 1.0-3pclos2010 firefox (3.5.5-3pclos2010) to 3.5.6-1pclos2010 gnome-keyring (2.28.1-1pclos2010) to 2.28.2-1pclos2010 gnome-terminal (2.28.1-1pclos2010) to 2.28.2-1pclos2010 libdbus-glib-1_2 (0.78-1pclos2007) to 0.82-1pclos2010 libgail18 (2.18.3-6pclos2010) to 2.18.5-1pclos2010 libgcrypt11 (1.4.4-1pclos2009) to 1.4.5-1pclos2010 libgdiplus0 (1.2.3-1pclos2007) to 2.6-1pclos2010 libgnome-keyring0 (2.28.1-1pclos2010) to 2.28.2-1pclos2010 libgnomekbd4 (2.28.0-2pclos2010) to 2.28.2-1pclos2010 libnautilus1 (2.28.2-1pclos2010) to 2.28.4-1pclos2010 libpango1.0-devel (1.26.1-1pclos2010) to 1.26.2-1pclos2010 libpango1.0_0 (1.26.1-1pclos2010) to 1.26.2-1pclos2010 libpango1.0_0-modules (1.26.1-1pclos2010) to 1.26.2-1pclos2010 libpulseaudio0 (0.9.21-1pclos2010) to 0.9.21-3pclos2010 libpulseglib20 (0.9.21-1pclos2010) to 0.9.21-3pclos2010 libtelepathy-glib0 (0.9.0-1pclos2010) to 0.9.2-1pclos2010 libtotem-plparser12 (2.28.1-1pclos2009) to 2.28.2-1pclos2010 mencoder (1.0-0.rc2.6pclos2009) to 1.0-0.rc4.1pclos2010 mplayer (1.0-0.rc2.6pclos2009) to 1.0-0.rc4.1pclos2010 mplayer-gui (1.0-0.rc2.6pclos2009) to 1.0-0.rc4.1pclos2010 nautilus (2.28.2-1pclos2010) to 2.28.4-1pclos2010 pango (1.26.1-1pclos2010) to 1.26.2-1pclos2010 pango-doc (1.26.1-1pclos2010) to 1.26.2-1pclos2010 pulseaudio (0.9.21-1pclos2010) to 0.9.21-3pclos2010 pulseaudio-client-config (0.9.21-1pclos2010) to 0.9.21-3pclos2010 sgml-common (0.6.3-13pclos2007) to 0.6.3-14pclos2010 task-xfce (4.6.1-2pclos2010) to 4.6.1-3pclos2010 totem-pl-parser-i18n (2.28.1-1pclos2009) to 2.28.2-1pclos2010 Installed the following packages: gstreamer0.10-farsight2 (0.0.15-2pclos2010) Thanks again for the workaround. Andy
> Thanks again for the workaround. > > Andy Andy - I have improved the script so that the full message body is preserved. It was being cut short. You can find it here:- http://forum.mandriva.com/viewtopic.php?p=758868 Barry
It seems Picasa calls thunderbird with the "mailto URL" syntax, which for security reasons, does not support attachments anymore: http://mxr.mozilla.org/mozilla1.8/source/mailnews/compose/src/nsSmtpUrl.cpp#96 So it seems like the problem lies in Picasa, which should really use the "-compose" syntax to send attachments.
(In reply to comment #12) > > Thanks again for the workaround. > > > > Andy > > Andy - I have improved the script so that the full message body is preserved. > It was being cut short. You can find it here:- > http://forum.mandriva.com/viewtopic.php?p=758868 > > Barry Thanks Mate the script works very well after I have upgraded the system last nite. Just changed it to the latest version available - works perfect. Andy
invalid based on comment 14