Print a file on your printer from anywhere in the world by sending an email!
MIT License
A Python 3 app to automatically print email attachments sent to your printer. Requires a printer configured with CUPS (Common Unix Printing System). Works on any Unix-like system including macOS and Linux, even the Raspberry Pi. It is recommended to use an account separate from your own email account.
cd
to the cloned folder.[sudo] ./setup.py install
.export MAIL_PRINTER_USERNAME="[email protected]"
export MAIL_PRINTER_PASSWORD="password"
python mailprinter
to start printing your email attachments from anywhere in the world.All configurations are made in config.json:
{
"IMAP_port": 993,
"IMAP_server": "imap.gmail.com",
"SSL_required": true,
"printer_name": "My_Printer",
"send_receive_interval": 60
}
IMAP_port:
The port used for IMAP by your email provider. Generally port 993
.IMAP_server
: The IP/domain of the IMAP server.SSL_required
: A boolean signifying whether the server requires SSLprinter_name
: The name of the printer as used by CUPS. Run the program to see the listsend_recieve_interval
: The time interval (in seconds) between re-checking emails.NOTE: Only PDF attachments are printed right now.