Bug 251383

Summary: can't print selected multiple emails
Product: [Applications] kmail Reporter: Jeremy Johnson <jazz_johnson>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED DUPLICATE    
Severity: wishlist CC: jazz_johnson, montel
Priority: NOR    
Version: 1.13.5   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

Description Jeremy Johnson 2010-09-15 23:30:07 UTC
Version:           1.13.5 (using KDE 4.5.1) 
OS:                Linux

I would like to be able to select multiple emails and then print them all at once by clicking print. But when multiple emails are selected, the print button is disabled.

Reproducible: Always




I though I could work around this issue by moving all my emails to a new folder and then archive this folder to a zipfile. After unzipping this file, I thought I could use enscript or muttprint to print all the emails, e.g.:

unzip Archive.zip; cd NewFolder/cur; 

for f in *; do echo $f;
muttprint --paper=letter -p - -f $f | ps2pdf14 - $f.pdf
done

Unfortunately, muttprint prints pdf attachments as raw jibberish.
kmail prints emails nicely, but it's very time consuming to have to select each email one-by-one, click print, set all print options (it never remembers your preferences), and click OK.

So it would be nice to be able to select multiple emails and print them all with one click. If that's not possible, would it be possible to expose the print routine so that I could substitute kmailprint for muttprint?
e.g., I can view an email, "kmail --view file:`pwd`/722992"
so could I do something similar to print? "kmail --print file:`pwd`/722992"
Comment 1 Jeremy Johnson 2010-09-16 22:34:13 UTC
I found another solution (in case anybody else needs to print multiple emails)

1) use squirrelmail's mail_archive plugin to save folder to zipped mbox
2) use hypermail to create html folder:
   #hypermail -d html-folder -p -m MBOX
3) use the perl script html2ps available at http://user.it.uu.se/~jan/html2ps.html
   html2ps -Wb html-folder/index.html > Emails.ps
   ps2pdf14 Emails.ps Emails.pdf

Emails.pdf now contains all emails in one single pdf file with hyperlinks and indexed by thread, author, subject, date.
Comment 2 Laurent Montel 2011-11-09 09:53:49 UTC
I looked how to implement it and it's not possible for the moment...
Comment 3 Jeremy Johnson 2011-11-10 16:36:40 UTC
As a workaround I wrote a perl script to translated hypermail's html output to pdf via LaTeX. 
See <url>http://www.acjlaw.net:8080/~jeremy/Ricoh/usage_mbox2pdf.html</url>
and added an entry to the Kmail Tools Wiki under Mail Export Tools
<url>http://userbase.kde.org/KMail/Tools</url>
Comment 4 Christophe Marin 2011-12-18 21:57:32 UTC

*** This bug has been marked as a duplicate of bug 34894 ***