- imap to print
- use case: on a Raspi oder Office server that hangs in the same LAN like the printer and can print via cups/system using "lp"
- just uses
lpunder the hood
- uses the awesome mail_room Gem under the hood to handle imap connection, which does most of the lifting
Send Mail as a authorized return-path (via regex matching) to your mailbox, it will print all pdf Attachments.
--- :email: "firstname.lastname@example.org" :password: "securepassword" :host: 'imap.mycompany.de' :port: 993 :ssl: true :start_ssl: false :delete_after_delivery: true :expunge_deleted: true :name: "inbox" :search_command: 'NEW' :delivery_method: "print_attachments" :delivery_options: :whitelist_from: ".*@mycompany.de$" # Modify lp command to change media format, or address, see lp -h for all options :lp_command: "lp -o media=a4 -o sides=two-sided-long-edge"
Or wrap with your favourite init tool.