cups-mailto is a backend for the Common Unix Printing System.
The mailto backend emails the filtered output to the user who requested the print job. The print job's output will be MIME attached to the email. cups-mailto is written in Python and depends on /usr/bin/file --mime-type to generate the MIME type for this attachment.
It also needs a working email system (MTA) that supports the "-t" switch for /usr/sbin/sendmail.
Place the downloaded file mailto into the backend directory of your CUPS installation (usually /usr/lib/cups/backend) and restart the CUPS daemon.
The mailto backend identifies itself as SMTP to the CUPS configuration system.
To add a "printer" using the mailto backend you can use lpadmin like this: lpadmin -p <printername> -m laserjet -v mailto
There is no need for a printer URI because the mailto backend uses the username of the print job. In fact you can specify anything as printer URI when using the web interface for CUPS.
The mailto backend knows about two command line options passed via lp:
If mailto is set mailfrom will bet set to the requestor's username.
If both options are given and do not equal to the username of the requestor a custom X-CUPS-mailto-started-by:-header is added that contains the requestor's username for tracking purposes.
One purpose of the mailto backend is to deliver a PDF generation service where the users get the PDF output back in an email.
To accomplish this you need a pstopdf filter for CUPS with the accompanying PPD.
There are some issue with the Postscript output of some Windows printer drivers. We have best results with the HP LaserJet 8500 Color tuned to archive mode and with Ctrl-D turned off before and after the job.
Current released version is 2.0.
See the project page for more details.